-
Notifications
You must be signed in to change notification settings - Fork 56
feat: diagnostics uncaught sdk errors installed by script #1419
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
feat: diagnostics uncaught sdk errors installed by script #1419
Conversation
|
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.
Comment @cursor review or bugbot run to trigger another review on this PR
|
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
Summary
https://amplitude.atlassian.net/wiki/spaces/GOV/pages/3501359165/Diagnostics+track+uncaught+SDK+errors#3.-Runtime-stack-trace-filtering-%E2%AD%90%EF%B8%8F
Auto capture uncaught errors originated from Amplitude SDK including Amplitude plugins by comparing the error stack trace. Errors in event callbacks in Amplitude plugins will be captured too. This only works for installing by <script> tag. If any stack frame contains the the script filename, it's considered as a SDK error.
Checklist
Note
Add global listeners to capture uncaught SDK/plugin errors when loaded via <script>, wiring into DiagnosticsClient and snippet to register script URL, plus exports and tests.
diagnostics/uncaught-sdk-errors.tswithregisterSdkLoaderMetadataandenableSdkErrorListenersto recordsdk.error.uncaughtvia globalerror/unhandledrejectionlisteners when errors originate from the SDK script.enableSdkErrorListeners(this)when diagnostics sampling is enabled inDiagnosticsClient.registerSdkLoaderMetadatafromsrc/index.ts.uncaught-sdk-errors.test.ts, and index export test updates.snippet-index.ts, resolve current script URL and callregisterSdkLoaderMetadatato enable origin detection.test-server/diagnostics.htmlto load SDK via script and include buttons/workflows to trigger SDK and non-SDK errors for diagnostics verification.Written by Cursor Bugbot for commit 24d0bde. Configure here.