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

telemetry

package
v2.219.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package telemetry decides the OpenTelemetry environment a Claude seat launches with: token metrics tagged by seat, and never logs or events. See docs/claude-launch-identity.md.

Index

Constants

View Source
const (
	// EnvSwitch is the launch-time kill switch. "off" disables export.
	EnvSwitch = "AGENT_COMPOSE_TELEMETRY"
	// EnvShadow is the native session id AOS sets for a shadowed session.
	EnvShadow = "AOS_NATIVE_SESSION"

	// DefaultProtocol matches the collector's OTLP/HTTP listener.
	DefaultProtocol = "http/protobuf"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	OTLPMetricsEndpoint string `yaml:"otlp_metrics_endpoint"`
	Protocol            string `yaml:"protocol"`
}

Config is the `telemetry` block of the host configuration.

func (*Config) Validate

func (c *Config) Validate() error

Validate rejects an endpoint the exporter could not use.

type Plan

type Plan struct {
	Set   map[string]string
	Unset []string
}

Plan is the environment change a launch applies: Set wins, Unset clears.

func Environment

func Environment(cfg *Config, harness, seat, shadow, killSwitch string) Plan

Environment returns the plan for one Claude seat. Disabled or endpointless, it clears every managed variable, so an exporting parent leaks nothing.

Jump to

Keyboard shortcuts

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