telemetry

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecordCommand

func RecordCommand(cmdName string)

RecordCommand increments the usage count for a CLI command.

func RecordInjectionStyle

func RecordInjectionStyle(style string)

RecordInjectionStyle records a unique injection style used (e.g. "bearer", "header").

func RecordIntegration

func RecordIntegration(name string)

RecordIntegration records a unique integration (e.g. "mcp", "env", "proxy", "exec").

func RecordProxyBlocked

func RecordProxyBlocked()

RecordProxyBlocked increments the blocked proxy request counter.

func RecordProxyCall

func RecordProxyCall()

RecordProxyCall increments the total proxy call counter.

func RecordProxyRedacted

func RecordProxyRedacted()

RecordProxyRedacted increments the redacted proxy response counter.

func SyncIfDue

func SyncIfDue(client *api.Client, cliVersion string)

SyncIfDue checks if 24 hours have passed and flushes telemetry to the cloud.

Types

type Data

type Data struct {
	LastSync             time.Time      `json:"last_sync"`
	CommandExecutions    map[string]int `json:"command_executions"`
	CliVersion           string         `json:"cli_version,omitempty"`
	OS                   string         `json:"os,omitempty"`
	Arch                 string         `json:"arch,omitempty"`
	ActiveEnvironment    string         `json:"active_environment,omitempty"`
	ProjectSecretCount   int            `json:"project_secret_count,omitempty"`
	WorkspaceType        string         `json:"workspace_type,omitempty"`
	WorkspaceMemberCount int            `json:"workspace_member_count,omitempty"`
	ProxyCalls           int            `json:"proxy_calls,omitempty"`
	ProxyBlocked         int            `json:"proxy_blocked,omitempty"`
	ProxyRedacted        int            `json:"proxy_redacted,omitempty"`
	InjectionStylesUsed  []string       `json:"injection_styles_used,omitempty"`
	IntegrationsActive   []string       `json:"integrations_active,omitempty"`
}

Jump to

Keyboard shortcuts

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