telemetry

package
v2.36.4 Latest Latest
Warning

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

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

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]interface{} `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