Skip to content

RUM-985 propagate session state and view type as Strings#1625

Merged
xgouchet merged 1 commit into
developfrom
xgouchet/RUM-985/1_propagate_rum_context_as_string
Sep 20, 2023
Merged

RUM-985 propagate session state and view type as Strings#1625
xgouchet merged 1 commit into
developfrom
xgouchet/RUM-985/1_propagate_rum_context_as_string

Conversation

@xgouchet

Copy link
Copy Markdown
Contributor

What does this PR do?

The RUM session_state and view_type were propagated as internal enums in the shared RUM feature context. This means that other modules could not use those values (except with a call to toString(), which could have resulted in obfuscated results).

This PR ensures the data is shared as a String, to be manipulated unobfuscated from any module using it.

Motivation

Part of the work done to make the RUM sampling consistent between Webviews and the native app.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@xgouchet
xgouchet requested a review from a team as a code owner September 19, 2023 17:10
@codecov-commenter

codecov-commenter commented Sep 19, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1625 (6464702) into develop (85087f3) will increase coverage by 0.08%.
Report is 3 commits behind head on develop.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop    #1625      +/-   ##
===========================================
+ Coverage    83.59%   83.67%   +0.08%     
===========================================
  Files          452      452              
  Lines        15661    15660       -1     
  Branches      2326     2327       +1     
===========================================
+ Hits         13091    13102      +11     
+ Misses        1945     1937       -8     
+ Partials       625      621       -4     
Files Changed Coverage Δ
.../datadog/android/rum/internal/domain/RumContext.kt 100.00% <100.00%> (ø)
...droid/rum/internal/domain/scope/RumSessionScope.kt 95.51% <100.00%> (+0.10%) ⬆️
.../android/rum/internal/domain/scope/RumViewScope.kt 95.42% <100.00%> (+0.02%) ⬆️

... and 16 files with indirect coverage changes

@0xnm 0xnm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch! another option btw is to add the rules to the proguard file we ship with the library, was it considered? anyway, I'm fine with this solution as well.

@xgouchet

Copy link
Copy Markdown
Contributor Author

@0xnm

another option btw is to add the rules to the proguard file we ship with the library, was it considered? anyway, I'm fine with this solution as well.
I thought about it, but since those enums are internal anyway, it felt wrong to add a proguard rule for it

@xgouchet
xgouchet merged commit 6cb970f into develop Sep 20, 2023
@xgouchet
xgouchet deleted the xgouchet/RUM-985/1_propagate_rum_context_as_string branch September 20, 2023 08:32
@xgouchet xgouchet added this to the 2.2.0 milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants