telemetry

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package telemetry provides opt-in analytics and telemetry collection. Currently this is a stub implementation that does nothing (no-op). Future versions may implement opt-in telemetry to improve the CLI experience.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Track

func Track(ctx context.Context, event Event) error

Track records a telemetry event using the default client

func TrackCommand

func TrackCommand(ctx context.Context, command string, duration int64, success bool) error

TrackCommand records a command execution using the default client

func TrackError

func TrackError(ctx context.Context, command string, errType string) error

TrackError records an error using the default client

Types

type Client

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

Client represents a telemetry client

func NewClient

func NewClient() *Client

NewClient creates a new telemetry client Currently returns a no-op client

func (*Client) Close

func (c *Client) Close() error

Close closes the telemetry client and flushes any pending events

func (*Client) Disable

func (c *Client) Disable()

Disable disables telemetry collection

func (*Client) Enable

func (c *Client) Enable()

Enable enables telemetry collection (opt-in)

func (*Client) Flush

func (c *Client) Flush(ctx context.Context) error

Flush sends any pending events This is a no-op implementation

func (*Client) IsEnabled

func (c *Client) IsEnabled() bool

IsEnabled returns whether telemetry is enabled

func (*Client) Track

func (c *Client) Track(ctx context.Context, event Event) error

Track records a telemetry event This is a no-op implementation

func (*Client) TrackCommand

func (c *Client) TrackCommand(ctx context.Context, command string, duration int64, success bool) error

TrackCommand records a command execution event This is a no-op implementation

func (*Client) TrackError

func (c *Client) TrackError(ctx context.Context, command string, errType string) error

TrackError records an error event This is a no-op implementation

type Event

type Event struct {
	Name       string
	Properties map[string]interface{}
}

Event represents a telemetry event

Jump to

Keyboard shortcuts

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