Skip to content

Commit

Permalink
Additional telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelGHSeg committed Oct 22, 2024
1 parent e37d234 commit acccc34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Segment/Analytics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public class Analytics {
it["cdnhost"] = configuration.values.cdnHost
it["flush"] =
"at:\(configuration.values.flushAt) int:\(configuration.values.flushInterval) pol:\(configuration.values.flushPolicies.count)"
it["config"] = "seg:\(configuration.values.autoAddSegmentDestination) ua:\(configuration.values.userAgent ?? "N/A")"
}
}

Expand Down
5 changes: 5 additions & 0 deletions Sources/Segment/Timeline.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ internal class Mediator {

internal func remove(plugin: Plugin) {
plugins.removeAll { (storedPlugin) -> Bool in
Telemetry.shared.increment(metric: Telemetry.INTEGRATION_METRIC) {
(_ it: inout [String: String]) in
it["message"] = "removed"
it["plugin"] = "\(plugin.type)-\(String(describing: plugin))"
}
return plugin === storedPlugin
}
}
Expand Down

0 comments on commit acccc34

Please sign in to comment.