DataDog / dd-sdk-android

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

RUM-4592: Add diagnostic attributes to "RUM Session Ended" metric #2101

Closed ambushwork closed 2 weeks ago

ambushwork commented 2 weeks ago

What does this PR do?

Add following attributes into "Rum Session Ended Metric"

“rse” : {

   “views_count”: { 

      “with_has_replay”: <int>,

   },

   “no_view_events_count”: { “actions”: <int>, “resources”: <int>, “errors”: <int>, “long_tasks”: <int> },

   “has_background_events_tracking_enabled”: <bool>,

   “ntp_offset”: { “at_start”: <int>, “at_end”: <int> }

 }

}

Motivation

As Required in RUM-4592

Additional Notes

 “by_instrumentation”: { “<instrumentation type>”: <int> },

Review checklist (to be filled by reviewers)

codecov-commenter commented 2 weeks ago

Codecov Report

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

Please upload report for BASE (feature/session-ended-metric@f2aa3d8). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## feature/session-ended-metric #2101 +/- ## =============================================================== Coverage ? 68.72% =============================================================== Files ? 721 Lines ? 26709 Branches ? 4499 =============================================================== Hits ? 18355 Misses ? 7130 Partials ? 1224 ``` | [Files](https://app.codecov.io/gh/DataDog/dd-sdk-android/pull/2101?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [...droid/rum/internal/domain/scope/RumSessionScope.kt](https://app.codecov.io/gh/DataDog/dd-sdk-android/pull/2101?src=pr&el=tree&filepath=features%2Fdd-sdk-android-rum%2Fsrc%2Fmain%2Fkotlin%2Fcom%2Fdatadog%2Fandroid%2Frum%2Finternal%2Fdomain%2Fscope%2FRumSessionScope.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-ZmVhdHVyZXMvZGQtc2RrLWFuZHJvaWQtcnVtL3NyYy9tYWluL2tvdGxpbi9jb20vZGF0YWRvZy9hbmRyb2lkL3J1bS9pbnRlcm5hbC9kb21haW4vc2NvcGUvUnVtU2Vzc2lvblNjb3BlLmt0) | `96.64% <100.00%> (ø)` | | | [...d/rum/internal/domain/scope/RumViewManagerScope.kt](https://app.codecov.io/gh/DataDog/dd-sdk-android/pull/2101?src=pr&el=tree&filepath=features%2Fdd-sdk-android-rum%2Fsrc%2Fmain%2Fkotlin%2Fcom%2Fdatadog%2Fandroid%2Frum%2Finternal%2Fdomain%2Fscope%2FRumViewManagerScope.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-ZmVhdHVyZXMvZGQtc2RrLWFuZHJvaWQtcnVtL3NyYy9tYWluL2tvdGxpbi9jb20vZGF0YWRvZy9hbmRyb2lkL3J1bS9pbnRlcm5hbC9kb21haW4vc2NvcGUvUnVtVmlld01hbmFnZXJTY29wZS5rdA==) | `93.71% <83.33%> (ø)` | | | [.../android/rum/internal/metric/SessionEndedMetric.kt](https://app.codecov.io/gh/DataDog/dd-sdk-android/pull/2101?src=pr&el=tree&filepath=features%2Fdd-sdk-android-rum%2Fsrc%2Fmain%2Fkotlin%2Fcom%2Fdatadog%2Fandroid%2Frum%2Finternal%2Fmetric%2FSessionEndedMetric.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-ZmVhdHVyZXMvZGQtc2RrLWFuZHJvaWQtcnVtL3NyYy9tYWluL2tvdGxpbi9jb20vZGF0YWRvZy9hbmRyb2lkL3J1bS9pbnRlcm5hbC9tZXRyaWMvU2Vzc2lvbkVuZGVkTWV0cmljLmt0) | `93.55% <97.73%> (ø)` | | | [...um/internal/metric/SessionEndedMetricDispatcher.kt](https://app.codecov.io/gh/DataDog/dd-sdk-android/pull/2101?src=pr&el=tree&filepath=features%2Fdd-sdk-android-rum%2Fsrc%2Fmain%2Fkotlin%2Fcom%2Fdatadog%2Fandroid%2Frum%2Finternal%2Fmetric%2FSessionEndedMetricDispatcher.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-ZmVhdHVyZXMvZGQtc2RrLWFuZHJvaWQtcnVtL3NyYy9tYWluL2tvdGxpbi9jb20vZGF0YWRvZy9hbmRyb2lkL3J1bS9pbnRlcm5hbC9tZXRyaWMvU2Vzc2lvbkVuZGVkTWV0cmljRGlzcGF0Y2hlci5rdA==) | `66.67% <85.71%> (ø)` | |
ambushwork commented 2 weeks ago

@0xnm just fixed an issue in unit test, pls approve it again