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
|
maciejburda
left a comment
There was a problem hiding this comment.
Compared to iOS implementation and documentation (internal).
LGTM
413769b to
0069f66
Compare
7c1d16c to
bbcafbe
Compare
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.
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.
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.
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.
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)