Documentation
¶
Index ¶
- func CommandLine(command string, commandLine []string)
- func Error(inContext string, e error)
- func GetClientID() akid.ClientID
- func Init(loggingEnabled bool)
- func RateLimitError(inContext string, e error)
- func Shutdown()
- func Success(message string)
- func WorkflowStep(workflow string, message string)
- type Tracker
- type TrackingUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandLine ¶
func GetClientID ¶
Returns a global ClientID, generated once per CLI instance.
func Init ¶
func Init(loggingEnabled bool)
Initialize the telemetry client. This should be called once at startup either from the root command or from a subcommand that overrides the default PersistentPreRun.
func RateLimitError ¶
func Shutdown ¶
func Shutdown()
Flush the telemetry to its endpoint (even buffer size of 1 is not enough if the CLI exits right away.)
func WorkflowStep ¶
Types ¶
type Tracker ¶ added in v0.37.3
type Tracker interface {
// Existing methods (backward compatibility)
Error(inContext string, e error)
RateLimitError(inContext string, e error)
APIError(method string, path string, e error)
Failure(message string)
Success(message string)
WorkflowStep(workflow string, message string)
CommandLine(command string, commandLine []string)
// Lifecycle
Shutdown() error
}
Tracker interface defines the telemetry contract
func Default ¶ added in v0.37.3
func Default() Tracker
Default returns the root tracker instance for backward compatibility
func NewScoped ¶ added in v0.37.3
func NewScoped(user TrackingUser) Tracker
NewScoped creates a new scoped tracker with different user context
type TrackingUser ¶ added in v0.37.3
func GetTrackingUserAssociatedWithAPIKey ¶ added in v0.37.3
func GetTrackingUserAssociatedWithAPIKey(frontClient rest.FrontClient) (TrackingUser, error)
Get the tracking user associated with the API key
Click to show internal directories.
Click to hide internal directories.