telemetry

package
v0.51.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 10 Imported by: 2

Documentation

Overview

Package telemetry registers the telemetry initialiser with the setup system. When TelemetryCmd is enabled and the user runs `init`, they are prompted to opt into anonymous usage telemetry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsentForm added in v0.43.0

func ConsentForm(p *props.Props, optIn *bool) *huh.Form

ConsentForm asks the one-time opt-in question in the tool's name. The root pre-run asks it too, for tools that never run init.

Types

type TelemetryInitialiser

type TelemetryInitialiser struct {
	// contains filtered or unexported fields
}

TelemetryInitialiser implements setup.Initialiser. It prompts the user to opt into telemetry during init.

func NewTelemetryInitialiser

func NewTelemetryInitialiser(p *props.Props) *TelemetryInitialiser

NewTelemetryInitialiser creates a new TelemetryInitialiser.

func (*TelemetryInitialiser) Configure

func (t *TelemetryInitialiser) Configure(ctx context.Context, p *props.Props, cfg setup.Editor) error

Configure prompts the user to opt into telemetry. If TELEMETRY_ENABLED is set, applies it directly without prompting.

func (*TelemetryInitialiser) IsConfigured

func (t *TelemetryInitialiser) IsConfigured(cfg config.Reader) bool

IsConfigured returns true if the telemetry.enabled key has been explicitly set in config, OR if the TELEMETRY_ENABLED environment variable is set (any value counts as "configured — no prompt needed").

func (*TelemetryInitialiser) Name

func (t *TelemetryInitialiser) Name() string

Name returns the human-readable name for this initialiser.

Jump to

Keyboard shortcuts

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