telemetry

package
v2.51.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const Endpoint = "https://telemetry.hasura.io/v1/http"

Endpoint is where telemetry data is sent.

Variables

View Source
var Topic = "cli_test"

Topic is the name under which telemetry is sent.

Waiter waits for telemetry ops to complete, if required.

Functions

This section is empty.

Types

type Data

type Data struct {
	// UUID used for telemetry, generated on first run.
	UUID string `json:"uuid"`

	// UUID obtained from server.
	ServerUUID string `json:"server_uuid"`

	// Unique id for the current execution.
	ExecutionID string `json:"execution_id"`

	// OS platform and architecture.
	OSPlatform string `json:"os_platform"`
	OSArch     string `json:"os_arch"`

	// Current cli version.
	Version string `json:"version"`

	// Current Server version.
	ServerVersion string `json:"server_version"`

	// Command being executed.
	Command string `json:"command"`

	// Indicates whether the execution resulted in an error or not.
	IsError bool `json:"is_error"`

	Error error `json:"error"`

	// Any additional payload information.
	Payload map[string]any `json:"payload"`

	// Additional objects - mandatory
	Logger *logrus.Logger `json:"-"`

	// IsBeamed indicates if this data is already beamed or not.
	IsBeamed bool `json:"-"`

	// CanBeam indicates if data can be beamed or not, e.g. disabled telemetry.
	CanBeam bool `json:"-"`
}

Data holds all info collected and transmitted.

func BuildEvent

func BuildEvent() *Data

BuildEvent returns a Data object which represent a telemetry event.

func (*Data) Beam

func (d *Data) Beam()

Beam the telemetry data.

Jump to

Keyboard shortcuts

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