-
Notifications
You must be signed in to change notification settings - Fork 52
fix: add diagnostics to client and track autocapture getHierachy block time #1312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add diagnostics to client and track autocapture getHierachy block time #1312
Conversation
cf60aa3
to
42a882b
Compare
bugbot run |
bugbot run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no bugs!
Comment @cursor review
or bugbot run
to trigger another review on this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm. Some minor comments.
I'll definitely want SR and Autocapture reviewers to approve this first though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SR changes (sampling changes) LGTM!
Summary
isSessionInSample()
toisTimestampInSample()
and move it from SR to core packageamplitude.init()
.Ideally, both remote config client and diagnostics client should be in
AmplitudeContext
but it requires significant change so this PR adds them to internal browser config.Checklist
Note
Introduces a diagnostics client with sampling, integrates it into the browser/unified clients, tracks autocapture getHierarchy timing, and switches autocapture to use a provided remote-config client.
DiagnosticsClient
(tags/counters/histograms/events, flush/save timers) with deterministic sampling (generateHashCode
,isTimestampInSample
).AmplitudeContext
-> interfaces) and configs to carrydiagnosticsClient
/remoteConfigClient
.DiagnosticsClient
; set library tag; expose_setDiagnosticsSampleRate
backdoor; plumb through config (enableDiagnostics
,diagnosticsSampleRate
).remoteConfigClient
through; factories wrap new method.getHierarchy
duration via diagnostics histogram.remoteConfigClient.subscribe
.isTimestampInSample
(remove local sampler).amplitude.js
in.gitignore
.Written by Cursor Bugbot for commit 4aba738. This will update automatically on new commits. Configure here.