Help us shape the future of Go! Take the 2026 Go Developer Survey

telemetry

package
v1.0.66 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package telemetry hands completed CLI events to a short-lived sender process. The command process never initializes the SDK or waits for a network request.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptedOut

func OptedOut() bool

OptedOut preserves the existing DO_NOT_TRACK semantics, including "0".

func RunWorker

func RunWorker(args []string, input *os.File) bool

RunWorker handles only the private sender invocation, before command assembly. Even malformed input or an SDK panic must not become a business command.

func Submit

func Submit(event Event)

Submit waits only for a bounded local handoff. A successful handoff is not an acknowledgement of delivery. Incomplete handoffs are discarded by the worker.

Types

type Event

type Event struct {
	Protocol          int      `json:"protocol"`
	Version           string   `json:"version"`
	Command           string   `json:"command"`
	Path              string   `json:"path"`
	ExitCode          int      `json:"exitCode"`
	DurationMillis    int64    `json:"durationMillis"`
	CompletedAtMillis int64    `json:"completedAtMillis"`
	ErrorSummary      string   `json:"errorSummary,omitempty"`
	Identity          Identity `json:"identity"`
}

Event is a completed command, not the sender's own execution. No arguments, stdout, working directory, attribution, credentials, or arbitrary fields cross the process boundary.

type Identity

type Identity struct {
	UserID   string `json:"userId,omitempty"`
	UserName string `json:"userName,omitempty"`
	CorpID   string `json:"corpId,omitempty"`
}

Identity contains only the existing reviewed profile metadata projection.

Jump to

Keyboard shortcuts

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