DataDog / dd-sdk-android

Datadog SDK for Android (Compatible with Kotlin and Java)
Apache License 2.0
140 stars 56 forks source link

RUM-4879: Granular telemetry sampling for mappers #2087

Closed jonathanmos closed 2 weeks ago

jonathanmos commented 3 weeks ago

What does this PR do?

Have more granular telemetry sampling for mappers, using three levels - default, reduced and rare, with each level reducing the number of events by a factor of 10.

Motivation

At the moment the default sampling rate is producing far too many events for some mappers.

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

codecov-commenter commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.

Project coverage is 68.97%. Comparing base (61e5b99) to head (2cb01af).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #2087 +/- ## =========================================== + Coverage 68.88% 68.97% +0.09% =========================================== Files 708 708 Lines 26302 26275 -27 Branches 4424 4424 =========================================== + Hits 18116 18121 +5 + Misses 6984 6942 -42 - Partials 1202 1212 +10 ``` | [Files](https://app.codecov.io/gh/DataDog/dd-sdk-android/pull/2087?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [...ssionreplay/internal/recorder/TreeViewTraversal.kt](https://app.codecov.io/gh/DataDog/dd-sdk-android/pull/2087?src=pr&el=tree&filepath=features%2Fdd-sdk-android-session-replay%2Fsrc%2Fmain%2Fkotlin%2Fcom%2Fdatadog%2Fandroid%2Fsessionreplay%2Finternal%2Frecorder%2FTreeViewTraversal.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-ZmVhdHVyZXMvZGQtc2RrLWFuZHJvaWQtc2Vzc2lvbi1yZXBsYXkvc3JjL21haW4va290bGluL2NvbS9kYXRhZG9nL2FuZHJvaWQvc2Vzc2lvbnJlcGxheS9pbnRlcm5hbC9yZWNvcmRlci9UcmVlVmlld1RyYXZlcnNhbC5rdA==) | `91.67% <76.92%> (-4.25%)` | :arrow_down: | ... and [37 files with indirect coverage changes](https://app.codecov.io/gh/DataDog/dd-sdk-android/pull/2087/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog)
xgouchet commented 2 weeks ago

[!IMPORTANT] Shouldn't we target this to the latest release branch instead of develop, to publish an hotfix? Or are we planning a new release soon?