Skip to content

RUM-18748: Check profiling quota only for RUM sessions sampled for profiling - #3960

Merged
0xnm merged 1 commit into
developfrom
nogorodnikov/rum-18748/call-profiling-quota-check-only-for-rum-sessions-sampled-for-profiling
Oct 6, 2026
Merged

0xnm merged 1 commit into
developfrom
nogorodnikov/rum-18748/call-profiling-quota-check-only-for-rum-sessions-sampled-for-profiling

Conversation

@0xnm

@0xnm 0xnm commented Oct 5, 2026

Copy link
Copy Markdown
Member

What does this PR do?

The quota check used to run for every RUM session. It now runs only for tracked sessions sampled for continuous profiling or owning the app launch profile. ANR trigger profiles request their own check when they are matched and are written once the decision for their session lands.

Quota results carry their session id and are discarded once the session has changed, and the launch profile is judged by its own session only. The RUM session state is exposed through FeatureContextKeys.RUM_SESSION_STATE.

Similar change in iOS SDK DataDog/dd-sdk-ios#3256.

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)

@0xnm

0xnm commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T07:48:14.679516Z 261a2ee Draft marked ready
🔒 Security Review ✅ Completed 2026-10-06T07:47:13.271399Z 261a2ee Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Tests

✅ All CI checks and tests passed. Datadog automation helped this PR pass.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 1 test - 1 passed on retry View in Datadog

🎯 Code Coverage (details)
• Patch Coverage: 89.90%
• Overall Coverage: 71.77% (+0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 261a2ee | Docs | View more details | Give us feedback!

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 269f3953ac

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 269f3953ac

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

…ofiling

The quota check used to run for every RUM session. It now runs only for
tracked sessions sampled for continuous profiling or owning the app launch
profile. ANR trigger profiles request their own check when they are matched
and are written once the decision for their session lands.

Quota results carry their session id and are discarded once the session has
changed, and the launch profile is judged by its own session only. The RUM
session state is exposed through FeatureContextKeys.RUM_SESSION_STATE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0xnm
0xnm force-pushed the nogorodnikov/rum-18748/call-profiling-quota-check-only-for-rum-sessions-sampled-for-profiling branch from 269f395 to 261a2ee Compare October 6, 2026 07:28
@0xnm

0xnm commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 261a2ee8a1

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 261a2ee8a1

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@0xnm
0xnm marked this pull request as ready for review October 6, 2026 07:43
@0xnm
0xnm requested review from a team as code owners October 6, 2026 07:43

@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: 261a2ee8a1

ℹ️ 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".

}
}

private fun tryWritePendingLaunchProfile() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: replace method body with = to make it more clean

@0xnm
0xnm merged commit e64985c into develop Oct 6, 2026
26 checks passed
@0xnm
0xnm deleted the nogorodnikov/rum-18748/call-profiling-quota-check-only-for-rum-sessions-sampled-for-profiling branch October 6, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants