clitrace

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

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 TraceID

func TraceID() string

TraceID returns the invocation's trace id, or "" before Start.

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.

Jump to

Keyboard shortcuts

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