Skip to content

RUM-13610: Create a class to handle thread-safe state updates with notification - #3743

Open
0xnm wants to merge 1 commit into
developfrom
nogorodnikov/rum-13610/create-state-entity-for-thread-safe-observation
Open

RUM-13610: Create a class to handle thread-safe state updates with notification#3743
0xnm wants to merge 1 commit into
developfrom
nogorodnikov/rum-13610/create-state-entity-for-thread-safe-observation

Conversation

@0xnm

@0xnm 0xnm commented Aug 20, 2026

Copy link
Copy Markdown
Member

What does this PR do?

This PR extracts (with some improvements) the class to handle state updates with listeners attached.

The new class is using DDCoreSubscription under the hood to manage subscriptions and adds state management on top of it.

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 requested review from a team as code owners August 20, 2026 10:29
@0xnm
0xnm force-pushed the nogorodnikov/rum-13610/create-state-entity-for-thread-safe-observation branch from 4e3ff24 to dba04ae Compare August 20, 2026 10:29

@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: 4e3ff245f8

ℹ️ 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-5

datadog-prod-us1-5 Bot commented Aug 20, 2026

Copy link
Copy Markdown

Tests

🎉 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: 85.45%
Overall Coverage: 71.78% (-0.02%)

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

…tification

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@0xnm
0xnm force-pushed the nogorodnikov/rum-13610/create-state-entity-for-thread-safe-observation branch from dba04ae to 325fea4 Compare August 20, 2026 11:00
@sbarrio
sbarrio requested a review from ambushwork August 21, 2026 07:08
return try {
subscription.notifyListeners { onStateChanged(newState) }
null
} catch (e: Throwable) {

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.

Q: do we want to catch all the Throwable here? for example OOM, we might want it to be propagated instead of being caught as a notify failure?

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.

2 participants