Documentation
¶
Overview ¶
Package clitrace gives one CLI invocation one trace. Its transport carries that trace to the platform on the CLI's platform API clients, so audit entries and server spans for a command share a trace id the console can open.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
func Start(command string) (end func())
Start opens the root span for this invocation and returns the function that ends it. Spans are exported when OTEL_EXPORTER_OTLP_ENDPOINT is set; without it the trace id is still generated and sent to the platform, whose spans then appear without a CLI root. Calling Start again replaces the trace.
func Transport ¶
func Transport(base http.RoundTripper) http.RoundTripper
Transport sends requests as part of the invocation's trace. Requests made before Start, or by a caller that already carries a span, are left alone.
Types ¶
This section is empty.