Documentation
¶
Index ¶
Constants ¶
const ( ErrorTypeConnectionTimeout = "connection_timeout" ErrorTypeAuthFailed = "auth_failed" ErrorTypeConfigInvalid = "config_invalid" ErrorTypeFileNotFound = "file_not_found" ErrorTypeServiceError = "service_error" ErrorTypeUserCancelled = "user_cancelled" ErrorTypeUnknown = "unknown" )
Error categories - never log raw error messages (may contain PII)
const NoticeText = `` /* 239-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func CategorizeError ¶
CategorizeError returns a safe category string for an error Never returns the actual error message to avoid leaking PII
func ShowFirstRunNotice ¶
ShowFirstRunNotice displays the analytics notice on first run Returns true if the notice was shown (and we should track first_run)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the PostHog client for analytics
func NewClient ¶
func NewClient() *Client
NewClient creates a new analytics client. Returns nil if analytics is disabled.
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
Tracker handles analytics for a single command execution
var GlobalTracker *Tracker
GlobalTracker is the analytics tracker for the current process. Initialized once per command via InitTracker. Nil-safe — all methods are no-ops on a nil receiver.
func InitTracker ¶
InitTracker creates the global tracker for the given command. Returns nil if analytics is disabled.
func (*Tracker) TrackResult ¶
TrackResult records the command result (call after Execute returns)