Skip to content

ref(node): Include source context lines for all exceptions #4734

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

Merged
merged 3 commits into from
Mar 21, 2022

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Mar 18, 2022

Fixes #4729

  • Ensures source context is added to all exceptions!
  • readSourceFiles becomes readSourceFile
    • Since we already have an LRU, nothing is gained by loading files in groups

@timfish timfish changed the title Include context lines for all exceptions ref(node): Include source context lines for all exceptions Mar 18, 2022
@AbhiPrasad
Copy link
Member

Can we add a regression test?

@timfish
Copy link
Collaborator Author

timfish commented Mar 18, 2022

Yep, just working on one now!

@timfish
Copy link
Collaborator Author

timfish commented Mar 18, 2022

Realised that the ContextLines integration needs to be after LinkedErrors for context to be added to linked errors!

@timfish timfish force-pushed the fix/linked-context-lines branch from 893b7ce to c9f611a Compare March 18, 2022 16:14
@timfish
Copy link
Collaborator Author

timfish commented Mar 21, 2022

@AbhiPrasad do we need to add code that ensures that ContextLines is always the last integration?

As soon an users modify integrations there's no guarantee that it'll be last.

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to add code that ensures that ContextLines is always the last integration

Yeah this is tricky, there is no priority system. I say we live with this for now since we've had no complaints about this before, and we can re-visit if it becomes problematic.

@timfish
Copy link
Collaborator Author

timfish commented Mar 21, 2022

Currently, I think priority only applies to LinkedErrors + ContextLines

@AbhiPrasad AbhiPrasad merged commit 79a109c into getsentry:master Mar 21, 2022
@timfish timfish deleted the fix/linked-context-lines branch March 22, 2022 20:24
@AbhiPrasad AbhiPrasad added this to the Pre 7.0.0 Work milestone Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linked errors don't contain code in stack traces since 6.18.x
2 participants