Use the real Browser Debugger SDK in the runtime benchmark#440
Open
watson wants to merge 1 commit into
Open
Conversation
Contributor
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. |
🎉 All green!🧪 All tests passed 🔗 Commit SHA: 4e565bd | Docs | Datadog PR Page | Give us feedback! |
Live Debugger Runtime BenchmarkSDK-loaded dormant-probe runtime overhead, measured against an uninstrumented bundle in the same browser session. Browser Debugger SDK:
Full diagnosticsRaw samples are in the |
1c55ebd to
8c50c4c
Compare
1296572 to
d80cc4f
Compare
8c50c4c to
66f1360
Compare
d80cc4f to
ba9d257
Compare
This was referenced Jun 29, 2026
The benchmark previously installed a hand-written stub of the SDK's instrumentation runtime ($dd_probes / $dd_entry / $dd_return / $dd_throw). That stub could silently drift from what actually ships, so the measured dormant overhead was not guaranteed to reflect production. Fetch the published Browser Debugger SDK bundle from the CDN, inline it before the fixture runs, and call DD_DEBUGGER.init() with its probe-delivery poll mocked same-origin to return an empty set. This keeps the SDK dormant (no active probes) while wiring the real $dd_probes lookup that the benchmark measures, so it cannot drift from the shipped runtime. Record provenance for each run so a result can be tied to an exact build. The SDK version is read from DD_DEBUGGER.version, and because the published /v7/ bundle reuses the same release-format version across many master builds, the CDN object's build fingerprint (publish date and S3 ETag content hash) is captured from the bundle-fetch response headers. The version and both headers are asserted, so a missing one fails the run rather than reporting a build that cannot be identified. Add an optional onResponse hook to @dd/core's doRequest so callers can read response headers (it previously returned only the body); the benchmark uses it to capture Last-Modified and the ETag.
66f1360 to
4e565bd
Compare
ba9d257 to
0168305
Compare
This was referenced Jul 3, 2026
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.

What and why?
The Live Debugger runtime benchmark measured dormant overhead against a hand-written stub of the SDK's instrumentation runtime (
$dd_probes/$dd_entry/$dd_return/$dd_throw), which could silently drift from what actually ships. This PR replaces that stub with the real published Browser Debugger SDK, loaded but kept dormant, so the measured overhead reflects production. It also records per-run provenance — the SDK version and the CDN build fingerprint — so any benchmark result can be tied to the exact build it was measured against.How?
datadog-debugger.jsbundle from the CDN, inline it before the fixture runs, mock the probe-delivery poll same-origin to return an empty probe set, and callDD_DEBUGGER.init()after load so the SDK wires the real$dd_probeslookup while staying dormant (no active probes).DD_DEBUGGER.version, failing the run if it is missing.Last-Modified) and S3 ETag (content hash, normalized from CloudFront's weakW/"…"form) — and assert both are present, since the/v7/bundle reuses the same release-format version across many master builds and is therefore ambiguous on its own.onResponsehook to@dd/core'sdoRequestso callers can read response headers (it previously returned only the parsed body); the benchmark uses it to readLast-ModifiedandETag.CONTRIBUTING.md.