Skip to content

RUM-19625: Accept custom attributes in _RumInternalProxy.addLongTask - #4112

Open
ambushwork wants to merge 1 commit into
developfrom
ylu/rum-19625-addlongtask-custom-attributes-8d4fe7ad
Open

ambushwork wants to merge 1 commit into
developfrom
ylu/rum-19625-addlongtask-custom-attributes-8d4fe7ad

Conversation

@ambushwork

@ambushwork ambushwork commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Adds an optional attributes: Map<String, Any?> = emptyMap() parameter to _RumInternalProxy.addLongTask. The parameter is also added to AdvancedRumMonitor, DatadogRumMonitor and RumRawEvent.AddLongTask. The attributes are merged into the long task event context, on top of the parent and view attributes. RumAttributes.LONG_TASK_TARGET is applied last, so it can't be overwritten. The monitor copies the map (toMap()) before queueing, so if the caller changes the map afterwards, the event keeps the original values. api/apiSurface and api/dd-sdk-android-rum.api are regenerated.

Motivation

[RUM-19625](https://datadoghq.atlassian.net/browse/RUM-19625): cross-platform SDKs need to attach custom attributes to long tasks they report through the internal proxy. This unblocks [RUM-19626](https://datadoghq.atlassian.net/browse/RUM-19626).

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)

Add an optional attributes parameter to _RumInternalProxy.addLongTask and
pass it through AdvancedRumMonitor and RumRawEvent.AddLongTask into the long
task event context. The map is copied before queueing. Regenerate api files.
@ambushwork

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 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-11-05T16:52:47.961806Z 294fbd9 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-05T16:54:38.659589Z 294fbd9 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.

@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: 294fbd9801

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

@ambushwork ambushwork added the ready-for-human-review All agentic review feedback was addressed and PR is ready for the human review. label Nov 5, 2026
@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: 294fbd9801

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.

@ambushwork
ambushwork marked this pull request as ready for review November 5, 2026 16:50
@ambushwork
ambushwork requested review from a team as code owners November 5, 2026 16:50
@ambushwork
ambushwork requested a review from awforsythe November 5, 2026 16:50

@datadog-prod-us1-6 datadog-prod-us1-6 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.

Bits Code Review: PASS

More details

Long-task attributes are copied before queueing and merged over parent and view attributes, with the reserved target applied last. The completed static review found no actionable defects in this behavior.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 294fbd9

@awforsythe awforsythe left a comment

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.

Incredible! Thanks for taking care of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human-review All agentic review feedback was addressed and PR is ready for the human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants