Skip to content

RUM-1061: Don't send rum context when sessionId is NULL_UUID#3304

Merged
kikoveiga merged 2 commits into
developfrom
kikoveiga/RUM-1061/dont-send-null-rum-context
Apr 7, 2026
Merged

RUM-1061: Don't send rum context when sessionId is NULL_UUID#3304
kikoveiga merged 2 commits into
developfrom
kikoveiga/RUM-1061/dont-send-null-rum-context

Conversation

@kikoveiga

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Align with iOS to return null RumContext when activeSession is null.
  • Prevent NULL_UUID RUM session ids from being published to the shared feature context. The context is now also cleared of any stale values from a previous session.

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)

@kikoveiga kikoveiga changed the title RUM-1061: Don't send null rum context RUM-1061: Don't send rum context when sessionId is NULL_UUID Mar 30, 2026
@kikoveiga
kikoveiga force-pushed the kikoveiga/RUM-1061/dont-send-null-rum-context branch from ef91d66 to 4317378 Compare March 30, 2026 11:23
@kikoveiga
kikoveiga marked this pull request as ready for review March 30, 2026 11:32
@kikoveiga
kikoveiga requested review from a team as code owners March 30, 2026 11:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 43173787c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Mar 30, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 71.33% (-0.20%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7c62ccf | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@codecov-commenter

codecov-commenter commented Mar 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.43%. Comparing base (41ae98f) to head (7c62ccf).

Files with missing lines Patch % Lines
.../android/rum/internal/monitor/DatadogRumMonitor.kt 72.73% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3304      +/-   ##
===========================================
- Coverage    71.49%   71.43%   -0.07%     
===========================================
  Files          946      946              
  Lines        34895    34895              
  Branches      5906     5908       +2     
===========================================
- Hits         24947    24924      -23     
- Misses        8283     8289       +6     
- Partials      1665     1682      +17     
Files with missing lines Coverage Δ
.../android/rum/internal/monitor/DatadogRumMonitor.kt 88.00% <72.73%> (-0.25%) ⬇️

... and 37 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

val rumContext = currentRumContext()
sdkCore.updateFeatureContext(Feature.RUM_FEATURE_NAME) {
it.putAll(currentFeatureContext.toMap())
it.clear()

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.

Calling clear is not quite correct if RUM feature context has something on top of the RumContext. Is it needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In this class are the only places where we call updateFeatureContext with Feature.RUM_FEATURE_NAME, so the idea was to clear stale entries, should I still remove it?

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.

Let's keep it then.

@kikoveiga kikoveiga self-assigned this Mar 30, 2026
@kikoveiga
kikoveiga force-pushed the kikoveiga/RUM-1061/dont-send-null-rum-context branch from 7e1446a to 7c62ccf Compare March 30, 2026 14:48
@kikoveiga
kikoveiga requested review from 0xnm and ambushwork March 30, 2026 14:50
@mariusc83 mariusc83 closed this Apr 2, 2026
@kikoveiga kikoveiga reopened this Apr 2, 2026

@ambushwork ambushwork 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

@kikoveiga
kikoveiga merged commit 38d6f49 into develop Apr 7, 2026
27 checks passed
@kikoveiga
kikoveiga deleted the kikoveiga/RUM-1061/dont-send-null-rum-context branch April 7, 2026 10:33
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.

5 participants