Skip to content
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

ref(node): Add source code context from LinkedErrors so integration order doesn't matter #4753

Merged
merged 1 commit into from
Mar 23, 2022

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Mar 22, 2022

Fixes #4729

@AbhiPrasad This is an alternative that gets this working for now without ordered integrations.

This PR:

  • Modifies the ContextLines integration so it can be used from elsewhere with it's options
  • In the LinkedErrors integration, if the ContextLines integration is enabled, adds context to linked errors

Also noticed that I left one of the tests with only enabled!

@timfish timfish force-pushed the fix/linked-error-context-lines branch from 6b89be4 to 31a1392 Compare March 22, 2022 20:25
@@ -199,11 +199,11 @@ describe('SentryNode', () => {
}
});

test.only('capture a linked exception with pre/post context', done => {
test('capture a linked exception with pre/post context', done => {
Copy link
Member

Choose a reason for hiding this comment

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

nice catch!

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) March 23, 2022 12:47
@AbhiPrasad AbhiPrasad merged commit 3657d2e into getsentry:master Mar 23, 2022
@timfish timfish deleted the fix/linked-error-context-lines branch March 23, 2022 13:54
@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