telemetry

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enabled

func Enabled() bool

Enabled returns whether telemetry is active.

func Init

func Init(version string) func()

Init initializes Sentry if telemetry is enabled. Returns a cleanup function that flushes buffered events.

func ResolveCommandName

func ResolveCommandName(args []string) string

ResolveCommandName extracts the subcommand name from os.Args. Returns the first non-flag argument after the binary name, or "root" if none.

func StartCommand

func StartCommand(ctx context.Context, command string) (context.Context, func(error))

StartCommand begins a Sentry transaction for a CLI command. Returns a context carrying the transaction and a finish function. The finish function captures errors, emits metrics, and ends the transaction.

Types

This section is empty.

Jump to

Keyboard shortcuts

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