-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(integrations): Add ContextLines
integration for html-embedded JS stack frames
#8699
Conversation
de565e8
to
05b450b
Compare
|
||
/** Processes an event and adds context lines */ | ||
public addSourceContext(event: Event): Event { | ||
const doc = WINDOW.document; |
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.
m: should only run if the current hub has the ContextLines
integration.
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.
Hmm good point. I guess the Node ContextLines
integration should have this check as well, right? Seems like we do it in some integrations and in others it's missing.
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.
yeah we need to include the check there too
I made some more changes to the new integration after re-checking the Node
|
ContextLines
integration for html-embedded JS stack framesContextLines
integration for html-embedded JS stack frames
Well here we go again 😅
This PR adds a "best-effort"
ContextLines
integration as an optional integration for the browser SDKs to pick up source code of and around stack frames pointing to code that's directly embedded in the current page's html.As outlined in #8656 (comment) and my initial attempt (#8670), there are a number of limitations around this integration. Chances are users end up with context lines off by one or two (and sometimes off by a lot of lines). However, this approach should bring us on par with competitors and hopefully provide some more context around errors that previously didn't have any code in their stack traces.
for the time being, this
closes #8656