reporting

package
v1.44.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package reporting provides error reporting via Sentry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureException

func CaptureException(err error)

CaptureException reports err to the error reporting backend.

func Flush

func Flush()

Flush blocks until all buffered events are delivered or the timeout elapses.

func Init

func Init(dsn, release string) error

Init initializes the error reporter with the given DSN and release version.

func RecoverAndReport

func RecoverAndReport(r any)

RecoverAndReport captures a recovered panic value to the error reporting backend. The caller is responsible for re-panicking and calling Flush before the process exits.

func SetAccountIDProvider

func SetAccountIDProvider(fn func() (string, error))

SetAccountIDProvider registers a function used to look up the current account ID, which is attached as a tag on every captured exception.

func SetCommandPath

func SetCommandPath(path string)

SetCommandPath records the cobra command path (e.g. "stripe webhooks create") to be attached as a tag on every captured exception. Only the command name is recorded — never args or flag values, which may contain sensitive data.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL