telemetry

package
v0.91.6 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const UnrecognisedUserID = "unrecognised"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	TrackEvent(ctx context.Context, eventName string, id string, tags Tags) error
}

Client defines the interface for tracking events.

type CommandTracker

type CommandTracker struct {
	// contains filtered or unexported fields
}

CommandTracker is an implementation in charge of tracking Commands events sent from the CLI.

func NewCommandTracker

func NewCommandTracker(client Client) *CommandTracker

NewCommandTracker creates a new CommandTracker instance.

func (*CommandTracker) Track

func (t *CommandTracker) Track(ctx context.Context, cmd string, tags Tags) error

Track sends a command event to the telemetry.Client.

type Tags

type Tags map[string]string

Tags represents a collection of event tags.

func (Tags) WithEnvironmentInfo

func (tg Tags) WithEnvironmentInfo() Tags

WithEnvironmentInfo adds environment information to the Tags.

func (Tags) WithRuntimeInfo

func (tg Tags) WithRuntimeInfo() Tags

WithRuntimeInfo adds runtime information to the Tags.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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