telemetry

package
v0.0.0-...-bc719ca Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExecutionID = newEventID()

Functions

func Error

func Error(err error, meta Metadata)

Error reports an error to the telemetry server.

func Event

func Event(e EventName, meta Metadata)

func FormatShellStart

func FormatShellStart(t time.Time) string

func ParseShellStart

func ParseShellStart(s string) time.Time

func ShellStart

func ShellStart() time.Time

func Start

func Start()

Start enables telemetry for the current program.

func Stop

func Stop()

Stop stops gathering telemetry and flushes buffered events to disk.

func Upload

func Upload()

Types

type EventName

type EventName int
const (
	EventCommandSuccess EventName = iota
	EventShellInteractive
	EventShellReady
	EventNixBuildSuccess
)

type Metadata

type Metadata struct {
	Command      string
	CommandFlags []string
	EventStart   time.Time
	FeatureFlags map[string]bool

	InShell   bool
	InCloud   bool
	InBrowser bool

	NixpkgsHash string
	Packages    []string

	CloudRegion string
	CloudCache  string
}

Jump to

Keyboard shortcuts

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