telemetry

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package telemetry sends anonymous usage events to RudderStack.

Mirrors the architecture of bruin-data/bruin's pkg/telemetry so improvements stay portable between the two CLIs. No PII is captured: only command names, durations, OS/arch, version, and an anonymous install ID stored at ~/.dac/telemetry.json. Disable with TELEMETRY_OPTOUT=1 or DO_NOT_TRACK=1.

Index

Constants

This section is empty.

Variables

View Source
var (
	OptOut       = false
	AppVersion   = ""
	RunID        = ""
	TemplateName = "" // Stores template name for init command (protected by lock)

)
View Source
var TelemetryKey string

Functions

func AfterCommand

func AfterCommand(ctx context.Context, cmd *cli.Command) error

func BeforeCommand

func BeforeCommand(ctx context.Context, c *cli.Command) (context.Context, error)

func ErrorCommand

func ErrorCommand(ctx context.Context, cmd *cli.Command, err error) error

func Init

func Init() io.Closer

func SendEvent

func SendEvent(event string, properties analytics.Properties)

func SetTemplateName

func SetTemplateName(name string)

SetTemplateName stores the template name picked during `dac init` so the AfterCommand hook can attach it to the command_end event.

Types

This section is empty.

Jump to

Keyboard shortcuts

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