getsentry / getsentry/sentry-go

Allow customizable stack trace offset when using abstracted interface

Open
#458 1 comment 2 reactions 0 assignees View on GitHub
Errors Feature Go
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.