Skip to content

Force new session at sdk initialization#1399

Merged
plousada merged 1 commit into
developfrom
plousada/RUMM-3068/start_session_on_sdk_init
Apr 27, 2023
Merged

Force new session at sdk initialization#1399
plousada merged 1 commit into
developfrom
plousada/RUMM-3068/start_session_on_sdk_init

Conversation

@plousada

Copy link
Copy Markdown
Member

Introduces the SdkInit event at the initialization of RumMonitor in order to make sure a session is started before the first RUM interaction.
This makes it so that logs and traces are correctly correlated to a valid session if they occur before the first view or action takes place.

What does this PR do?

A brief description of the change being made with this pull request.

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)

  • 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)

@plousada
plousada requested a review from a team as a code owner April 24, 2023 13:38
@plousada
plousada force-pushed the plousada/RUMM-3068/start_session_on_sdk_init branch from 43a9fe5 to 60eda0d Compare April 24, 2023 17:09
@codecov-commenter

codecov-commenter commented Apr 24, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1399 (60eda0d) into develop (5b10055) will increase coverage by 0.03%.
The diff coverage is 84.62%.

❗ Current head 60eda0d differs from pull request most recent head 26829b7. Consider uploading reports for the commit 26829b7 to get more accurate results

@@             Coverage Diff             @@
##           develop    #1399      +/-   ##
===========================================
+ Coverage    82.01%   82.04%   +0.03%     
===========================================
  Files          363      363              
  Lines        13021    13032      +11     
  Branches      2188     2191       +3     
===========================================
+ Hits         10678    10691      +13     
+ Misses        1685     1682       -3     
- Partials       658      659       +1     
Impacted Files Coverage Δ
...g/android/rum/internal/domain/scope/RumRawEvent.kt 81.93% <66.67%> (-0.28%) ⬇️
...droid/rum/internal/domain/scope/RumSessionScope.kt 90.11% <66.67%> (-0.90%) ⬇️
.../android/rum/internal/monitor/DatadogRumMonitor.kt 83.65% <100.00%> (-0.01%) ⬇️

... and 10 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.

lgtm! I've added a comment about redundant line.

Introduces an SdkInit event at the initialization of RumMonitor in order to make sure a session is started before the first interaction is recorded.
This makes it so that logs and traces correlated when correlated with RUM, have a valid session id present at all times.
@plousada
plousada force-pushed the plousada/RUMM-3068/start_session_on_sdk_init branch from 60eda0d to 26829b7 Compare April 26, 2023 12:16
@plousada
plousada merged commit 5b2f364 into develop Apr 27, 2023
@plousada
plousada deleted the plousada/RUMM-3068/start_session_on_sdk_init branch April 27, 2023 12:19
@xgouchet xgouchet added this to the 2.0.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