Default debugger version and embed build identity in snapshots#4511
Draft
watson wants to merge 6 commits intowatson/DEBUG-5296/add-live-debuggerfrom
Draft
Default debugger version and embed build identity in snapshots#4511watson wants to merge 6 commits intowatson/DEBUG-5296/add-live-debuggerfrom
watson wants to merge 6 commits intowatson/DEBUG-5296/add-live-debuggerfrom
Conversation
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 1ed65c3 | Docs | Datadog PR Page | Give us feedback! |
4c0a5c3 to
bc690fe
Compare
bf9a162 to
b9da4f3
Compare
bc690fe to
44d9b67
Compare
b9da4f3 to
0040ee8
Compare
44d9b67 to
c3334a6
Compare
0040ee8 to
653aee9
Compare
cff6b3c to
1ffcdba
Compare
1ffcdba to
5259f76
Compare
43903ba to
7d1efe7
Compare
Use build-plugin injected Live Debugger metadata as the default runtime `init().version`, and warn when an explicit init version disagrees. Document the fallback behavior and cover the new version resolution path in unit tests.
Browser snapshots need to carry the RUM application identity so the web UI can resolve source metadata via the browser-build lookup when git tags are absent.
Clarify that browser debugger version is optional, but when provided it should match the immutable deployed build identifier used for browser build lookup and sourcemap resolution. This keeps the SDK contract aligned with graceful degradation when no version is configured.
Move applicationId and version off ddtags onto a structured field at debugger.snapshot.build so the web UI reads browser-build identity from an unambiguous payload path instead of tags that can collide with downstream enrichment. Drop the top-level application_id field and the application_id/version ddtag entries that are now redundant.
7defb2b to
93ca4e3
Compare
Preserve the build-version defaulting flow while removing the applicationId-based snapshot build payload and docs/tests that described that unshipped resolution path. This keeps browser snapshots keyed by service plus version without introducing a separate structured build identity. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
The Browser Debugger SDK should be able to pick up the browser build version injected by the Live Debugger build plugin so applications do not need to pass the same deployed build identifier into
datadogDebugger.init()a second time.The debugger snapshot payload also needs
applicationIdandversionso downstream browser-build and source-resolution flows can identify the correct browser build when git tags are unavailable.Changes
Version defaulting from build metadata
datadogDebugger.init().versionfrom the build-plugin metadata when callers omitversioninit({ version })value authoritative and warn if it disagrees with the injected build-plugin versionversionis optional, but browser build lookup and source-aware resolution depend on an immutable deployed build identifier when availableSnapshot build identity
applicationIdandversionas a structuredbuildobject inside thedebugger.snapshotpayload (debugger.snapshot.build = { applicationId, version })application_idas a top-level field and duplicatingapplication_id/versionintoddtags, which was vulnerable to tag collision from downstream enrichmentbuildobject rides on the existing@debugger.snapshotcolumn projection, so the web UI reads it without any query changesVersion documentation
versionis optional in the Browser Debugger README and API docsversionshould be the immutable deployed browser build identifierversionis absentTest instructions
Run:
Part of larger effort
This PR is one part of the browser Live Debugger source-resolution work across multiple repositories:
Checklist