telemetry

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 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 RecordSecretCount added in v1.3.0

func RecordSecretCount(count int)

RecordSecretCount records the current number of secrets in the project.

func RecordWorkspaceMemberCount added in v1.3.0

func RecordWorkspaceMemberCount(count int)

RecordWorkspaceMemberCount records the number of members in the workspace.

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"`
	Daily    map[string]*Day `json:"daily"`
}

type Day added in v1.3.0

type Day struct {
	CommandExecutions   map[string]int `json:"command_executions"`
	ProxyCalls          int            `json:"proxy_calls"`
	ProxyBlocked        int            `json:"proxy_blocked"`
	ProxyRedacted       int            `json:"proxy_redacted"`
	InjectionStylesUsed []string       `json:"injection_styles_used"`
	IntegrationsActive  []string       `json:"integrations_active"`

	// Snapshot metadata for the day
	CliVersion           string `json:"cli_version"`
	OS                   string `json:"os"`
	Arch                 string `json:"arch"`
	ActiveEnvironment    string `json:"active_environment"`
	ProjectID            string `json:"project_id,omitempty"`
	WorkspaceID          string `json:"workspace_id,omitempty"`
	ProjectSecretCount   int    `json:"project_secret_count"`
	WorkspaceType        string `json:"workspace_type"`
	WorkspaceMemberCount int    `json:"workspace_member_count"`
}

Jump to

Keyboard shortcuts

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