Skip to content

fix: disable nonproduction RUM collection - #8258

Merged
tgmendes merged 3 commits into
mainfrom
fix/disable-nonprod-rum
Oct 29, 2026
Merged

tgmendes merged 3 commits into
mainfrom
fix/disable-nonprod-rum

Conversation

@tgmendes

@tgmendes tgmendes commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Restrict dashboard Datadog RUM initialization to production hosts.
  • Apply the same host restriction to Elements, preventing preview builds with RUM credentials from starting collection. The configured telemetry environment remains a label, not a second collection gate.
  • Cover development, staging, preview, localhost, and production initialization paths with regression tests.

Motivation

Development and staging sessions were being collected at full sampling rates. Gate collection before SDK initialization to prevent unnecessary RUM and session replay usage.

No visible UI changes; Gutternote review steps are not applicable.


Summary by cubic

Stops Datadog RUM and session replay collection on non-production hosts, preventing dev, staging, and preview sessions from consuming full sampling rates. The production host is now the single gate for collection in both dashboard and Elements; the configured telemetry environment is only a label.

  • Dashboard telemetry initializes only on production hosts and always uses the prod environment.
  • Elements error tracking collects only on production hosts, regardless of the configured telemetry label.
  • Adds regression tests covering dev, staging, preview, localhost, and production hosts for both dashboard and Elements.

Written for commit fd679e9. Summary will update on new commits.

View guided diff Turn on auto-fix

@tgmendes tgmendes added bug Something isn't working javascript Pull requests that update javascript code labels Oct 29, 2026
@changeset-bot

changeset-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: fd679e9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

@tgmendes
tgmendes marked this pull request as ready for review October 29, 2026 11:31
@tgmendes
tgmendes requested review from a team as code owners October 29, 2026 11:31
@tgmendes
tgmendes added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 1ce7b10 Oct 29, 2026
47 of 49 checks passed
@tgmendes
tgmendes deleted the fix/disable-nonprod-rum branch October 29, 2026 14:07
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants