Skip to content

refactor(tracing): use cli provided tracer - #14382

Open
jsternberg wants to merge 1 commit into
docker:mainfrom
jsternberg:cli-otel-providers
Open

jsternberg wants to merge 1 commit into
docker:mainfrom
jsternberg:cli-otel-providers

Conversation

@jsternberg

Copy link
Copy Markdown

Use the docker/cli library provided tracer rather than create and manage
our own. This has the benefit of less code and it puts the correct setup
of the docker telemetry tracer into the same one the core cli and buildx
use.

This also allows compose to use the same debug environment variables
that the cli and buildx use for testing telemetry.

This relies on docker/cli#7433 to work properly since
the current docker/cli library doesn't currently correctly shut down the
tracer and meter provider.

@jsternberg
jsternberg requested review from a team as code owners October 23, 2026 18:45
@jsternberg
jsternberg requested review from glours and ndeloof October 23, 2026 18:45

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🔴 CRITICAL

Two confirmed issues introduced by this PR:

  1. [high/security] go.mod:144 — The replace directive redirects github.com/docker/cli to a personal fork (jsternberg/cli) outside Docker's control. This must not be merged.
  2. [medium] internal/tracing/tracing.go:56 — InitProvider now returns a no-op shutdown, causing buffered OTLP spans to be silently dropped on process exit (regression from prior behavior; the PR description acknowledges the upstream fix is not yet shipped).

Comment thread go.mod Resolved
Comment thread internal/tracing/tracing.go Resolved
@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ndeloof

ndeloof commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Need to wait for a docker/cli release before we can merge this one

@jsternberg
jsternberg force-pushed the cli-otel-providers branch 2 times, most recently from ac6c46c to dd0715a Compare November 5, 2026 19:04
Use the docker/cli library provided tracer rather than create and manage
our own. This has the benefit of less code and it puts the correct setup
of the docker telemetry tracer into the same one the core cli and buildx
use.

This also allows compose to use the same debug environment variables
that the cli and buildx use for testing telemetry.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants