Innovation Week POC: Live Debugger browser support#4004
Innovation Week POC: Live Debugger browser support#4004watson wants to merge 16 commits intoDataDog:live-debugger-inno-weekfrom
Conversation
f96d981 to
c1de598
Compare
It should probably live somewhere else, but for now I've just hardcoded it in the sandbox app as a starting point
c1de598 to
102a611
Compare
1365737 to
4177de3
Compare
4a453f7 to
b9b2fb2
Compare
b9b2fb2 to
2a06d8a
Compare
e013a4d to
9fa4ebf
Compare
0b4dea7 to
3b3235f
Compare
3b3235f to
7399fd1
Compare
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
thomas.watson@datadoghq.com cancelled this merge request build |
|
/merge --cancel |
|
View all feedbacks in Devflow UI.
|
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
011c2f8 to
cd26a35
Compare
Why? Somewhere less obvious? Don't want to get caught? |
|
@watson, in order to better keep track of PRs that need our attention, I'm gonna convert this PR to draft. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd26a35847
ℹ️ 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".
| if ( | ||
| start - probe.lastCaptureMs < probe.msBetweenSampling || | ||
| !checkGlobalSnapshotBudget(start, probe.captureSnapshot) |
There was a problem hiding this comment.
Move sampling checks after condition evaluation
The sampling gate runs before any condition is evaluated, so a probe call with a false condition still consumes snapshot budget and advances the probe’s sampling window. In onEntry, this means high-frequency false evaluations can throttle later true evaluations and silently drop snapshots that should have been captured.
Useful? React with 👍 / 👎.
| const stackLines = error.stack.split('\n') | ||
|
|
||
| // Skip the first line (error message), the captureStackTrace frame, and any additional frames to skip | ||
| for (let i = 2 + skipFrames; i < stackLines.length; i++) { |
There was a problem hiding this comment.
Start parseStackTrace at first real frame for thrown errors
parseStackTrace always skips two lines, which is only correct for internally created errors in captureStackTrace; when called with a real thrown error (onThrow uses parseStackTrace(error)), it drops the top stack frame where the exception actually originated. This reduces snapshot accuracy by removing the most relevant frame.
Useful? React with 👍 / 👎.
| // Cache hostname at module initialization since it won't change during the app lifetime | ||
| const hostname = typeof window !== 'undefined' && window.location ? window.location.hostname : 'unknown' | ||
|
|
||
| const serviceVersion = `1.0.0-${crypto.randomUUID().slice(0, 8)}` // eslint-disable-line local-rules/disallow-side-effects |
There was a problem hiding this comment.
Add fallback when crypto.randomUUID is unavailable
This module initializes serviceVersion with crypto.randomUUID() at import time, so environments that lack randomUUID (common in older Safari/Chromium builds and many embedded WebViews) will throw before init() can run. That makes the live debugger fail to load entirely in those clients.
Useful? React with 👍 / 👎.
|
This PR currently points to the branch of this PR: #3996 I think we're ready to land both this PR that the one it's point to, so work can continue in incremental PRs towards the main branch instead of being contained in a single huge PR. |
|
/merge |
|
View all feedbacks in Devflow UI.
|
|
This seems to have been detected as a stack PR by the Merge Queue, so I will instead close this PR and make a new PR that's the sum of these two PRs. |
No description provided.