package cmdtrace

import "github.com/docker/compose/v2/cmd/cmdtrace"

Index

Functions

func Setup

func Setup(cmd *cobra.Command, dockerCli command.Cli) error

Setup should be called as part of the command's PersistentPreRunE as soon as possible after initializing the dockerCli.

It initializes the tracer for the CLI using both auto-detection from the Docker context metadata as well as standard OTEL_ env vars, creates a root span for the command, and wraps the actual command invocation to ensure the span is properly finalized and exported before exit.

Source Files

cmd_span.go

Version
v2.21.0
Published
Aug 30, 2023
Platform
js/wasm
Imports
14 packages
Last checked
1 hour ago

Tools for package owners.