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

Swallowed Panic Traces #275

Closed
matthinrichsen-wf opened this issue Mar 12, 2021 · 2 comments · Fixed by #278
Closed

Swallowed Panic Traces #275

matthinrichsen-wf opened this issue Mar 12, 2021 · 2 comments · Fixed by #278

Comments

@matthinrichsen-wf
Copy link

matthinrichsen-wf commented Mar 12, 2021

Description

https://github.com/newrelic/go-agent/blob/master/internal_txn.go#L424-L475 causes the stack trace which caused the panic to be lost.

Steps to Reproduce

Cause a panic between transaction.Start and defer transaction.End() and note that the reported stack trace is missing the original line which caused the error.

Expected Behavior

Either:
The original stack trace should be emitted as a log string(debug.Stack())

Or:
The panic should not be caught and callers should be expected to handle panics

@RichVanderwal RichVanderwal linked a pull request Mar 17, 2021 that will close this issue
@jodeev jodeev added this to the Mar Go agent release milestone Mar 17, 2021
@RichVanderwal RichVanderwal moved this from To Do to In progress in Go Engineering Board Mar 17, 2021
@RichVanderwal RichVanderwal moved this from In progress to Done in Go Engineering Board Mar 17, 2021
@RichVanderwal
Copy link
Contributor

Pending March Go Agent Maintenance Release.

@RichVanderwal
Copy link
Contributor

Hello, @matthinrichsen-wf !

Yesterday's Go Agent Release (v3.11.0) should address this ticket. The change we made in PR #278 is what you suggested, and now the agent logs stack traces when the cfg.ErrorCollector.RecordPanics setting is true.

Note that the stack trace produced will have a few more frames at the top than what would otherwise be produced, reflecting our RecordPanics instrumentation, so if you have any automated log processing, you may want to adjust as necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants