Allow customizable stack trace offset when using abstracted interface

Aperta
#458 1 commento 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

  • #459 di @mbrancato — chiusa senza merge

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go
Ambito
observability

Direzione di ricerca

Inizia individuando sentry.NewStacktrack e il suo utilizzo di runtime.Callers, quindi esamina come l’offset fisso attuale raggiunge lo stack trace risultante. Determina il punto di configurazione pubblico per l’offset e verifica che il trace inizi dal caller anziché dall’astrazione di logging.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Errors Feature Go

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.

Lingua principale
Go
Stelle
1.1k
Fork
264
Merge medio
2g 6h
PR unite (30g)
11

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/sentry-go

Tutte le issue di getsentry/sentry-go

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.