Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureErr ¶
CaptureErr sends an error to Sentry with optional string tags for context (e.g. round_id, share_index). No-op when Sentry is not initialized.
func InitSentry ¶
InitSentry initializes the Sentry SDK with the given DSN. If dsn is empty, Sentry remains disabled and all capture calls become no-ops. The release string is attached to every event for deploy correlation (typically the binary version from ldflags). serverName identifies the specific node (e.g. the CometBFT moniker "val1") so events from different validators can be distinguished in the Sentry dashboard.
Types ¶
type TraceSpan ¶ added in v0.5.36
type TraceSpan struct {
// contains filtered or unexported fields
}
TraceSpan is a small wrapper around a Sentry span that keeps callers from depending on sentry-go directly. Methods are safe to call when tracing is disabled.
func StartSpan ¶ added in v0.5.40
func StartSpan(ctx context.Context, operation, description string, tags map[string]string, data map[string]interface{}) (context.Context, *TraceSpan)
StartSpan starts a performance span when Sentry tracing is enabled. If ctx does not already contain a Sentry span, the span becomes the root transaction so background work is still sent to Sentry.
func StartTransaction ¶ added in v0.5.36
func StartTransaction(ctx context.Context, name string, tags map[string]string, data map[string]interface{}) (context.Context, *TraceSpan)
StartTransaction starts a root performance transaction when Sentry tracing is enabled. It returns the transaction context so child spans attach to it.