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

fix: filter out honeybadger source code from stack trace #982

Merged
merged 4 commits into from
Dec 21, 2022

Conversation

subzero10
Copy link
Member

Status

READY

Description

Fixes: #979

Todos

  • Fix
  • Tests
  • Manual Tests

@subzero10 subzero10 added bug js @honeybadger-io/js labels Dec 16, 2022
@subzero10 subzero10 self-assigned this Dec 16, 2022
stympy
stympy previously approved these changes Dec 16, 2022
continue
}

if (frame.file || frame.file === '<anonymous>') {
Copy link
Contributor

@shalvah shalvah Dec 16, 2022

Choose a reason for hiding this comment

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

What's the scenario where a frame's file is <Anonymous>? THat's missing in the (very good) explanation.

Copy link
Member Author

Choose a reason for hiding this comment

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

Your comment saved me! I missed a negation (it should be if (!frame.file ...).

To answer your question, this came up from the fault I was debugging. I don't know when it happens, but I know it can happen. That's why I came up with the [not-so-straight-forward] approach to ignore these frames if they happen to be in-between our source code. Otherwise, the algorithm would stop here and would not see that the next frame is still honeybadger source code.

See attached image.

image

Copy link
Contributor

@BethanyBerkowitz BethanyBerkowitz left a comment

Choose a reason for hiding this comment

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

Minor questions / comments but looking good!

packages/core/src/util.ts Outdated Show resolved Hide resolved
packages/core/src/util.ts Outdated Show resolved Hide resolved
packages/core/src/util.ts Outdated Show resolved Hide resolved
packages/core/src/util.ts Outdated Show resolved Hide resolved
packages/core/test/client.test.ts Outdated Show resolved Hide resolved
packages/core/test/client.test.ts Show resolved Hide resolved
@subzero10
Copy link
Member Author

@BethanyBerkowitz All review feedback applied. I've just requested another round of review :)

Copy link
Contributor

@BethanyBerkowitz BethanyBerkowitz left a comment

Choose a reason for hiding this comment

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

🚀 🌔 🪐

@subzero10 subzero10 merged commit e647b75 into master Dec 21, 2022
@shalvah shalvah deleted the broken_grouping_#979 branch December 21, 2022 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug js @honeybadger-io/js
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unrelated errors getting grouped together
4 participants