telemetry

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivateDebug

func ActivateDebug(logger Logger) func()

func EnableLogsDebug

func EnableLogsDebug() *logs.Logger

func GlobalLogs

func GlobalLogs() *logs.Logger

func SDKGoRecover

func SDKGoRecover(engine string)

SDKGoRecover recovers from a panic inside a goroutine that processes SDK results. It logs the panic; the deferred close(out) in the caller signals the consumer that the stream ended.

func SafeGo

func SafeGo(name string, fn func())

SafeGo launches a goroutine with automatic panic recovery. On panic the stack is logged and the goroutine exits cleanly.

func SafeRun

func SafeRun(name string, fn func())

SafeRun executes fn synchronously with panic recovery. On panic the stack is logged and SafeRun returns normally, so the caller (e.g. a worker loop) can continue processing.

func SuppressGlobalNonErrors

func SuppressGlobalNonErrors() func()

Types

type LogConfig

type LogConfig struct {
	Debug  bool
	Quiet  bool
	Output io.Writer
	Color  bool
}

type Logger

type Logger interface {
	Debugf(format string, args ...any)
	Infof(format string, args ...any)
	Warnf(format string, args ...any)
	Errorf(format string, args ...any)
	Importantf(format string, args ...any)
}

func ErrorOnlyLogger

func ErrorOnlyLogger(logger Logger) Logger

func GlobalLogger

func GlobalLogger(cfg LogConfig) Logger

func NewLogger

func NewLogger(cfg LogConfig) Logger

func NopLogger

func NopLogger() Logger

Jump to

Keyboard shortcuts

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