Documentation
¶
Overview ¶
Package sentry implements sentry-related functionality.
Index ¶
- func CaptureException(err error, opts ...CaptureOption)
- func CaptureExceptionWithAppInfo(ctx context.Context, err error, featureName string, appCompact *fly.AppCompact)
- func CaptureExceptionWithFlapsAppInfo(ctx context.Context, err error, featureName string, app *flaps.App)
- func CaptureMessage(msg string, opts ...CaptureOption)
- func Flush()
- func Recover(v any)
- func SetRunTags(fn func() map[string]string)
- type CaptureOption
- func WithContext(key string, val sentry.Context) CaptureOption
- func WithContexts(contexts map[string]sentry.Context) CaptureOption
- func WithExtra(key string, val any) CaptureOption
- func WithRequestID(requestID string) CaptureOption
- func WithStatusCode(status int) CaptureOption
- func WithTag(key, value string) CaptureOption
- func WithTraceID(ctx context.Context) CaptureOption
- type Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureException ¶ added in v0.0.286
func CaptureException(err error, opts ...CaptureOption)
func CaptureExceptionWithAppInfo ¶ added in v0.0.477
func CaptureExceptionWithFlapsAppInfo ¶ added in v0.3.225
func CaptureMessage ¶ added in v0.0.286
func CaptureMessage(msg string, opts ...CaptureOption)
func SetRunTags ¶ added in v0.5.27
SetRunTags sets the tags every event this process sends carries, for facts about the whole run, such as which coding agent ran flyctl. fn runs at most once, when the first event is captured (even one BeforeSend then drops), so runs that capture nothing pay nothing for it. Each call replaces the previous fn. A tag a capture sets itself wins, and empty values are left out. If fn panics, events carry no run tags: a panic here would otherwise repeat on every capture, including the one reporting a crash.
Types ¶
type CaptureOption ¶ added in v0.0.286
func WithContext ¶ added in v0.0.286
func WithContext(key string, val sentry.Context) CaptureOption
func WithContexts ¶ added in v0.0.286
func WithContexts(contexts map[string]sentry.Context) CaptureOption
func WithExtra ¶ added in v0.0.288
func WithExtra(key string, val any) CaptureOption
func WithRequestID ¶ added in v0.2.77
func WithRequestID(requestID string) CaptureOption
func WithStatusCode ¶ added in v0.2.77
func WithStatusCode(status int) CaptureOption
func WithTag ¶ added in v0.0.286
func WithTag(key, value string) CaptureOption
func WithTraceID ¶ added in v0.1.136
func WithTraceID(ctx context.Context) CaptureOption