package cmdtrace

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

Index

Functions

func Setup

func Setup(cmd *cobra.Command, dockerCli command.Cli, args []string) 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.32.2
Published
Jan 7, 2025
Platform
js/wasm
Imports
16 packages
Last checked
1 minute ago

Tools for package owners.