getsentry/sentry-go

Allow customizable stack trace offset when using abstracted interface

mbrancato opened this issue · 1 comments

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.

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀