-
Notifications
You must be signed in to change notification settings - Fork 61
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
RUM-1844: Add Method Call Telemetry #1940
RUM-1844: Add Method Call Telemetry #1940
Conversation
2eccdbe
to
ba05245
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1940 +/- ##
===========================================
- Coverage 83.55% 83.17% -0.38%
===========================================
Files 478 481 +3
Lines 17576 17643 +67
Branches 2672 2682 +10
===========================================
- Hits 14684 14673 -11
- Misses 2164 2239 +75
- Partials 728 731 +3
|
...otlin/com/datadog/android/sessionreplay/internal/recorder/telemetry/MethodCalledTelemetry.kt
Outdated
Show resolved
Hide resolved
...ain/kotlin/com/datadog/android/sessionreplay/internal/recorder/telemetry/TelemetryWrapper.kt
Outdated
Show resolved
Hide resolved
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.
Compared to iOS implementation and documentation (internal).
LGTM
...ain/kotlin/com/datadog/android/sessionreplay/internal/recorder/telemetry/TelemetryWrapper.kt
Outdated
Show resolved
Hide resolved
...ain/kotlin/com/datadog/android/sessionreplay/internal/recorder/telemetry/TelemetryWrapper.kt
Outdated
Show resolved
Hide resolved
...otlin/com/datadog/android/sessionreplay/internal/recorder/telemetry/MethodCalledTelemetry.kt
Outdated
Show resolved
Hide resolved
.../src/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/telemetry/MetricBase.kt
Outdated
Show resolved
Hide resolved
...otlin/com/datadog/android/sessionreplay/internal/recorder/telemetry/MethodCalledTelemetry.kt
Outdated
Show resolved
Hide resolved
...otlin/com/datadog/android/sessionreplay/internal/recorder/telemetry/MethodCalledTelemetry.kt
Outdated
Show resolved
Hide resolved
.../src/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/telemetry/MetricBase.kt
Outdated
Show resolved
Hide resolved
413769b
to
0069f66
Compare
7c1d16c
to
bbcafbe
Compare
buildSrc/src/main/kotlin/com/datadog/gradle/plugin/jsonschema/TypeDefinition.kt
Show resolved
Hide resolved
459f83d
to
50ab1fc
Compare
50ab1fc
to
c9854fa
Compare
c9854fa
to
d951c21
Compare
* @param samplingRate value between 0-100 for sampling the event. | ||
* @return a PerformanceMetric object that can later be used to send telemetry, or null if sampled out | ||
*/ | ||
fun startPerformanceMeasure( |
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.
why this one is a part of the FeatureScope
? by looking on the implementation it has nothing to do with the Feature - it takes InternalLogger
, which is bound to the SDK core and the rest is just the arguments passed to the method. Is it implemented the same way on iOS?
/** | ||
* Base class for performance metric events. | ||
*/ | ||
interface PerformanceMetric { |
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.
these metrics are going to our telemetry, so it makes sense to put @InternalApi
annotation here.
* @param logger - an instance of the internal logger. | ||
* @param startTime - the time when the metric is instantiated, to be used as the start point for the measurement. | ||
*/ | ||
class MethodCalledTelemetry( |
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.
this one can be internal class
if I'm not wrong, it is not used outside the package, it seems? And instances anyway are created via PerformanceMetric#startMetric
internalSdkCore: InternalSdkCore? = Datadog.getInstance() as? InternalSdkCore, | ||
private val deviceInfo: DeviceInfo? = internalSdkCore?.getDatadogContext()?.deviceInfo |
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.
why this is needed, if inside handleEvent
method there is already DatadogContext
provided as a part of withWriteContext
lambda?
What does this PR do?
Adds telemetry for view tree traversal time
Device and OS properties were added to debug and error telemetry. This required adding a fix for TypeDefinition to correctly merge additionalProperties (since the "telemetry" property now exists in the common schema). Also, I've opened a pr for rum-events-format to modify the schema there
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)