Documentation
¶
Overview ¶
Package telemetry provides fire-and-forget error reporting for the CLI. It routes events to two sinks: Sentry (crash grouping) and the Studio beacon (org-aware error history). Neither sink blocks the caller.
Index ¶
Constants ¶
const SentryDSN = "https://fbd21a6ec48a39098e00fdeebf08a57e@o4511035617116160.ingest.de.sentry.io/4511473423941712"
SentryDSN for the CLI error-tracking project. The DSN is intentionally public — it is safe to embed in client binaries. See: https://docs.sentry.io/concepts/key-terms/dsn-explainer/#dsn-is-open
Variables ¶
var StudioURL = "https://studio.taufinity.io"
StudioURL is the base URL for the Studio beacon endpoint.
var TelemetryKey = ""
TelemetryKey is the shared secret for X-Telemetry-Key on the Studio beacon. Write-only endpoint + rate limiting makes this acceptable for a public binary. Set via -X github.com/taufinity/cli/internal/telemetry.TelemetryKey=... in CI builds. When empty (go install by users without ldflags), the beacon is silently skipped.
Functions ¶
Types ¶
type Event ¶
type Event struct {
// EventType is the dotted event name: "auth.failure", "update.failure", etc.
EventType string
// ErrorCode is a machine-readable short code: "device_code_expired".
ErrorCode string
// ErrorMessage is the human-readable error string. Scrubbed before sending.
ErrorMessage string
// Email is set when the CLI is authenticated; empty otherwise.
Email string
}
Event is a single telemetry event.