-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add causal chain to the stack string #52
Conversation
terr = tcause | ||
} else { | ||
break | ||
} |
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.
Do you mind adding some comments here or updating the function comment?
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.
Also, do you think we need to worry about the performance here if we have a really long call stack? 🤔
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.
I wasn't quite sure what you were going for with the comments, so I've just followed the inferred intent of the original.
And for performance; granted, there is a risk of poor performance in extreme circumstances. But on the other hand, I feel like the usage of strings.Buffer
over repeated use of fmt.Sprintf()
is enough of a net win to outweigh any downside in most circumstances.
Just asking: ❓ Will this yield to new duplicate Sentry issues (if changing the stack trace)? |
Possibly. I'll try to remember to post a quick heads-up in #backend-announcements, or similar. |
For the record, I don't think it will have any impact on sentry reports. |
I've been chasing down a bunch of errors in tests where
(*terrors.Error).StackString()
was empty, which isn't convenient, so I've added the causal chain into the stack trace. Without this, even a single usage ofterrors.Augment()
would mean that stack traces would be blank (this might be why I've seen a bunch of blank stacktraces in Kibana, too).