telemetry

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const AnnotationSkipInUI = "telemetry.skip-in-ui"

Set on cobra commands the desktop polls frequently so their invocations don't drown out meaningful CLI activity.

Variables

This section is empty.

Functions

func GetMachineID

func GetMachineID() string

HMAC(machine-id, $HOME), hex-encoded. Returns the injected distinct ID when DEVSY_TELEMETRY_DISTINCT_ID is set (desktop-spawned CLI).

func SkipInUIAnnotation added in v1.3.1

func SkipInUIAnnotation() map[string]string

SkipInUIAnnotation returns the cobra Annotations map that flags a command as one the desktop polls frequently.

func WithCollector added in v1.3.1

func WithCollector(ctx context.Context, c CLICollector) context.Context

Types

type CLICollector

type CLICollector interface {
	RecordCLI(err error)
	SetClient(client devsyclient.BaseWorkspaceClient)

	// Flush makes sure all events are sent to the backend
	Flush()
}

func ApplyCLIConfig added in v1.3.1

func ApplyCLIConfig(devsyConfig *config.Config, current CLICollector) CLICollector

Swaps current for a noop collector if the user has opted out via context.

func BootstrapCLI added in v1.3.1

func BootstrapCLI(cmd *cobra.Command) CLICollector

Call before LoadConfig so config-load failures still get recorded. Always returns a non-nil collector.

func FromContext added in v1.3.1

func FromContext(ctx context.Context) CLICollector

Returns a noop collector when none is present so callers can use it unguarded.

type ErrorSeverityType

type ErrorSeverityType string
const (
	WarningSeverity ErrorSeverityType = "warning"
	ErrorSeverity   ErrorSeverityType = "error"
	FatalSeverity   ErrorSeverityType = "fatal"
	PanicSeverity   ErrorSeverityType = "panic"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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