getsentry / getsentry/sentry-go
Allow customizable stack trace offset when using abstracted interface
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 262
- Avg merge
- 1d 48m
- Merged PRs (30d)
- 7
Description
## Summary
It's very likely that as an application grows, developers will seek to abstract some foundational things they may need such as logging, etc. And additionally, manually capturing Sentry breadcrumbs or events would likely get abstracted as well. If an error has a stacktrace already, great. Otherwise, using `sentry.NewStacktrack()` is the way to go. But this hard-codes the offset to `1`.
I'd like it if we can configure the offset in the pcs from `runtime.Callers` so that the trace starts where the problem was, and not in the logger or other abstraction.
## Motivation
I already have a logger based on Zap and want to add Sentry integration. My logger is the first few frames of the stack trace which is clutter.
Contributor guide
Assessment
This issue has not been assessed yet.