Skip to content

detect: read OTEL_IGNORE_ERROR from environment - #6966

Merged
tonistiigi merged 1 commit into
moby:masterfrom
nomad3:fix/otel-ignore-error
Jul 22, 2026
Merged

detect: read OTEL_IGNORE_ERROR from environment#6966
tonistiigi merged 1 commit into
moby:masterfrom
nomad3:fix/otel-ignore-error

Conversation

@nomad3

@nomad3 nomad3 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

What this fixes

Commit 228e250d moved OTEL_IGNORE_ERROR handling into detectExporter, but the
refactor passed the environment variable name directly to strconv.ParseBool instead
of reading its value. Parsing the literal string always fails, so exporter errors cannot
be ignored even when OTEL_IGNORE_ERROR=true.

This restores the environment lookup used before that refactor.

Changes

  • read OTEL_IGNORE_ERROR from the environment;
  • add regression coverage for trace and metric exporters;
  • verify both the default error behavior and explicit error suppression.

The test uses an unknown exporter name, so it does not invoke a detector or connect to
an external telemetry backend.

Validation

go test ./util/tracing/detect/...
go vet ./util/tracing/detect/...
gofmt -l util/tracing/detect/

All tests and vet pass, and gofmt -l produces no output.

Behavior note

Operators with OTEL_IGNORE_ERROR already enabled will regain the error-suppression
behavior that existed before the refactor.

Signed-off-by: Simon Aguilera <saguilera1608@gmail.com>
@nomad3
nomad3 marked this pull request as ready for review July 20, 2026 02:41
@crazy-max crazy-max added this to the v0.32.0 milestone Jul 22, 2026
@tonistiigi
tonistiigi merged commit b8a2467 into moby:master Jul 22, 2026
193 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants