telemetry

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIError

func APIError(method string, path string, e error)

Report an error in a particular API, including the text of the error.

func CommandLine

func CommandLine(command string, commandLine []string)

Report command line flags (before any error checking.)

func Error

func Error(inContext string, e error)

Report an error in a particular operation (inContext), including the text of the error.

func Failure

func Failure(message string)

Report a failure withoout a specific error object

func GetClientID

func GetClientID() akid.ClientID

Returns a global ClientID, generated once per CLI instance.

func Init added in v0.25.0

func Init(isLoggingEnabled 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 InstallIntegrationVersion added in v0.24.0

func InstallIntegrationVersion(integration, arch, platform, version string)

Report the platform and version of an attempted integration

func RateLimitError

func RateLimitError(inContext string, e error)

Report an error in a particular operation (inContext), including the text of the error. Send only one trace event per minute for this particular context; count the remainder.

Rate-limited errors are not flushed when telemetry is shut down.

TODO: consider using the error too, but that could increase the cardinality of the map by a lot.

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 Success

func Success(message string)

Report success of an operation

func WorkflowStep added in v0.21.20

func WorkflowStep(workflow string, message string)

Report a step in a multi-part workflow.

Types

This section is empty.

Jump to

Keyboard shortcuts

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