OpenTelemetry: export over OTLP/HTTP only, without autoexport by caseycs · Pull Request #2 · caseycs/task · GitHub
Skip to content

OpenTelemetry: export over OTLP/HTTP only, without autoexport - #2

Merged
caseycs merged 1 commit into
otelfrom
otel-deps
Oct 13, 2026
Merged

caseycs merged 1 commit into
otelfrom
otel-deps

Conversation

@caseycs

@caseycs caseycs commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Addresses the maintainers' concern on go-task#2933 ("adding a dependency isn't something we do lightly, especially one like Prometheus"), with the compromise its author proposed: traces-only OTLP, without autoexport.

  • Spans go through otlptracehttp alone; it still honours OTEL_EXPORTER_OTLP_* (endpoint, headers, compression, certificate, timeout).
  • Tracing is on when OTEL_TRACES_EXPORTER=otlp, or when it is unset and an OTLP endpoint is set. Any other exporter name (e.g. console) leaves it off.
  • OTLP over gRPC is not supported.
On top of main Packages Binary (stripped) Prometheus
otel before +112 +1.5 MB yes
this PR +25 +0.6 MB no

gRPC itself was already linked in main.

Checked: go test ./..., vet and gofmt pass. A failing run exported to a local Jaeger arrives with task.outcome=failed and process.exit.code=3, and an unreachable endpoint costs 0.03s.

autoexport brings every exporter (Prometheus, OTLP gRPC, stdout; traces,
metrics and logs) for a feature that sends traces only. Spans now go
through otlptracehttp alone, which still honours the
OTEL_EXPORTER_OTLP_* settings (endpoint, headers, compression,
certificate, timeout).

Tracing is on when OTEL_TRACES_EXPORTER is "otlp", or it is unset and an
OTLP endpoint is set; any other exporter name leaves it off.

Against main: +25 packages and +0.6 MB (stripped), was +112 and +1.5 MB;
no Prometheus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@caseycs
caseycs merged commit 10676c2 into otel Oct 13, 2026
@caseycs
caseycs deleted the otel-deps branch October 15, 2026 14:04
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.

1 participant