Skip to content

RUM-16359: Refactor RumAgent setup#161

Merged
kikoveiga merged 1 commit into
developfrom
kikoveiga/RUM-16359/refactor-rumagent-setup
May 21, 2026
Merged

RUM-16359: Refactor RumAgent setup#161
kikoveiga merged 1 commit into
developfrom
kikoveiga/RUM-16359/refactor-rumagent-setup

Conversation

@kikoveiga

@kikoveiga kikoveiga commented May 18, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Simplify RumAgent setup initialization by using the rumAgent.control = "RUN" pattern in datadogSdk. Because of this, we know that we have all the fields initialized and can cache them safely, as we now do inside the RumAgent.setup() method.
  • Fix some buttons with wrong mapped functions in the sample app's DebugScreen.
  • Remove some no longer needed tests.

Motivation

RumAgent initialization and main loop was not optimal. It would do a bunch of repeated work, calling ensureUploader, ensureSetup, etc. multiple times, generating rendezvous and losing performance.

Sample app init before: (57 rendezvous)
image

Sample app init after: (47 rendezvous)
image

Doing a right-click on sample app before: (13 rendezvous)
image

Doing a right-click on sample app after: (3 rendezvous)
image

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 self-assigned this May 18, 2026
@kikoveiga
kikoveiga force-pushed the kikoveiga/RUM-16359/refactor-rumagent-setup branch 2 times, most recently from 7013d85 to 0b9d6c8 Compare May 19, 2026 09:38
@kikoveiga kikoveiga changed the title Refactor RumAgent setup RUM-16359: Refactor RumAgent setup May 19, 2026
@kikoveiga
kikoveiga marked this pull request as ready for review May 19, 2026 10:46
@kikoveiga
kikoveiga requested a review from a team as a code owner May 19, 2026 10:46

@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: 0b9d6c8939

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

Comment thread library/components/rum/RumAgent.bs
@kikoveiga
kikoveiga force-pushed the kikoveiga/RUM-16359/refactor-rumagent-setup branch from 0b9d6c8 to ae7a83d Compare May 20, 2026 09:46
@kikoveiga
kikoveiga force-pushed the kikoveiga/RUM-16359/refactor-rumagent-setup branch from ae7a83d to b2dc69e Compare May 20, 2026 09:48
@DataDog DataDog deleted a comment from datadog-prod-us1-5 Bot May 20, 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 0ff7680 into develop May 21, 2026
8 checks passed
@kikoveiga
kikoveiga deleted the kikoveiga/RUM-16359/refactor-rumagent-setup branch May 21, 2026 15:31
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