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 ¶
- Variables
- func AfterCommand(ctx context.Context, cmd *cli.Command) error
- func BeforeCommand(ctx context.Context, c *cli.Command) (context.Context, error)
- func ErrorCommand(ctx context.Context, cmd *cli.Command, err error) error
- func Init() io.Closer
- func SendEvent(event string, properties analytics.Properties)
- func SetTemplateName(name string)
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 BeforeCommand ¶
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.
Click to show internal directories.
Click to hide internal directories.