-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Telemetry Metrics #214
Telemetry Metrics #214
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #214 +/- ##
=============================================
- Coverage 78.65% 46.10% -32.55%
+ Complexity 502 14 -488
=============================================
Files 78 8 -70
Lines 6588 874 -5714
Branches 833 85 -748
=============================================
- Hits 5182 403 -4779
+ Misses 735 437 -298
+ Partials 671 34 -637 ☔ View full report in Codecov by Sentry. |
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/platform/Mediator.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/platform/Mediator.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Settings.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
…to MichaelGHSeg/Telemetry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall in good shape. just 4 things needs to be addressed before merged:
- possible concurrent issue on the telemetry queue
- consolidate 3 error reporting methods to 1 for simplicity
- better to have a lookup table for telemetry queue
- make Telemetry a Subscriber of Sovran
core/src/main/java/com/segment/analytics/kotlin/core/Analytics.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Settings.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Settings.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Telemetry.kt
Outdated
Show resolved
Hide resolved
…nalytics-kotlin into MichaelGHSeg/Telemetry
core/src/main/java/com/segment/analytics/kotlin/core/Analytics.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/segment/analytics/kotlin/core/Analytics.kt
Outdated
Show resolved
Hide resolved
assertEquals(0, TelemetryQueueSize()) | ||
assertEquals(0,errors.size) | ||
} | ||
|
||
@Test | ||
fun `Test increment with no tags`() { | ||
Telemetry.start() | ||
Telemetry.increment(Telemetry.INVOKE_METRIC, emptyMap()) | ||
Telemetry.increment(Telemetry.INVOKE_METRIC) { it.clear() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to clear. can just leave it with empty brackets. or make the tagBuilder
nullable, so you don't have to pass anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was in the test so I just figured I'd make it explicit about what it was expected to do, rather than minimize code. Just say the word if you'd rather it go away.
No description provided.