refactor(tracing): replace deprecated jaeger exporter with OTLP#13533
refactor(tracing): replace deprecated jaeger exporter with OTLP#13533iyiola-dev wants to merge 1 commit into
Conversation
Replace go.opentelemetry.io/otel/exporters/jaeger (deprecated, pinned at v1.14.0) with go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp. - Rewrite lib/tracing/setup.go to use otlptracehttp.New() - Rename SetupJaegerTracing -> SetupOTLPTracing - New env vars: LOTUS_OTEL_EXPORTER_ENDPOINT, LOTUS_OTEL_EXPORTER_INSECURE - Remove LOTUS_JAEGER_* env vars - Update callers in cli/lotus and cli/miner - Update docker-compose.yaml (port 6831/udp -> 4318 OTLP HTTP) - Replace documentation/en/jaeger-tracing.md with tracing.md Closes filecoin-project#13499
There was a problem hiding this comment.
Pull request overview
This PR migrates Lotus tracing export from the deprecated OpenTelemetry Jaeger exporter to the OTLP/HTTP trace exporter, updating configuration, callers, and docs accordingly.
Changes:
- Replace Jaeger exporter setup with OTLP/HTTP exporter setup in
lib/tracing, including newLOTUS_OTEL_EXPORTER_*env vars. - Update CLI entrypoints to call the new tracing setup function/signature.
- Update local/dev tooling and docs (docker-compose + tracing documentation) and adjust Go module dependencies.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/tracing/setup.go | Replaces Jaeger exporter wiring with otlptracehttp exporter and new env var handling. |
| cli/lotus/lotus.go | Switches tracing initialization from SetupJaegerTracing to SetupOTLPTracing. |
| cli/miner/miner.go | Switches tracing initialization from SetupJaegerTracing to SetupOTLPTracing. |
| docker-compose.yaml | Updates compose env vars and Jaeger port mapping to OTLP/HTTP. |
| documentation/en/tracing.md | Adds new tracing documentation describing OTLP/HTTP configuration and local Jaeger usage. |
| documentation/en/jaeger-tracing.md | Removes obsolete Jaeger-specific tracing documentation. |
| go.mod | Drops Jaeger exporter dependency and adds OTLP exporter dependencies. |
| go.sum | Updates dependency checksums for the OTLP exporter dependency graph. |
| CHANGELOG.md | Notes the tracing exporter migration and env var changes. |
Comments suppressed due to low confidence (3)
go.mod:155
- The OTLP exporter modules are pinned at v1.38.0 while the rest of the OpenTelemetry stack in this repo is v1.40.0 (otel/sdk/metric/etc.). Mixing minor versions can lead to subtle API/behavior incompatibilities. It would be safer to align the OTLP exporter versions with the
go.opentelemetry.io/otel/go.opentelemetry.io/otel/sdkversion used elsewhere (or rungo get/go mod tidyto converge them).
go.opentelemetry.io/otel v1.40.0
go.opentelemetry.io/otel/bridge/opencensus v1.40.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0
go.opentelemetry.io/otel/exporters/prometheus v0.50.0
go.opentelemetry.io/otel/metric v1.40.0
go.opentelemetry.io/otel/sdk v1.40.0
CHANGELOG.md:13
- This changelog entry links to PR #13415, which (per the PR description) was the attempted Jaeger version bump rather than the OTLP migration implemented here. The link should point at the PR that introduced this change (and/or the closed issue #13499) so the changelog references the correct work item.
- refactor(tracing): replace deprecated `jaeger` exporter with OTLP HTTP exporter. The `LOTUS_JAEGER_*` environment variables have been replaced by `LOTUS_OTEL_EXPORTER_ENDPOINT` and `LOTUS_OTEL_EXPORTER_INSECURE`. ([filecoin-project/lotus#13415](https://github.com/filecoin-project/lotus/pull/13415))
documentation/en/tracing.md:21
- The doc implies
jaeger-all-in-onewill listen for OTLP/HTTP on :4318 by default, but many Jaeger releases require explicitly enabling the OTLP receiver (e.g.,--collector.otlp.enabled=trueorCOLLECTOR_OTLP_ENABLED=true). Without mentioning this, the “Running Locally” steps can fail even when Lotus is configured correctly.
To easily run and view tracing locally, first, install Jaeger. The easiest way to do this is to [download the binaries](https://www.jaegertracing.io/download/) and then run the `jaeger-all-in-one` binary. This will start up Jaeger, listen for OTLP traces on `localhost:4318`, and expose a web UI for viewing traces on `http://localhost:16686/`.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -138,7 +138,7 @@ services: | |||
| jaeger: | |||
| image: jaegertracing/all-in-one | |||
There was a problem hiding this comment.
The Jaeger all-in-one container typically does not accept OTLP/HTTP on 4318 unless OTLP is explicitly enabled. With only the port mapping changed here, traces may fail to export. Consider setting the Jaeger env var to enable OTLP (e.g., COLLECTOR_OTLP_ENABLED=true) and ensure the corresponding receiver port is actually listening in the container version you’re using.
| image: jaegertracing/all-in-one | |
| image: jaegertracing/all-in-one | |
| environment: | |
| - COLLECTOR_OTLP_ENABLED=true |
There was a problem hiding this comment.
this is only right for the older version of jaegar tracing
|
hi @rvagg can you please review this at your earliest convenience? |
|
HI @iyiola-dev : thanks for the ping. Do to some travel and other priorities, I expect we'll still be delayed looking at this by at least a week or two. |
oh, great! that is completely fine. |
|
hi @BigLep is there some availability to review this now? |
Arg, yeah, we've kept this open for a long time now. @rvagg : is there anyone you suggest who could review and provide approval? Also, I know you cfeated the original issue @rvagg . Do you know customer impact of this not being completed yet? |
Replace go.opentelemetry.io/otel/exporters/jaeger (deprecated, pinned at v1.14.0) with go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp.
Closes #13499
Related Issues
Proposed Changes
otlptracehttp.New(), renameSetupJaegerTracing→ SetupOTLPTracingLOTUS_OTEL_EXPORTER_ENDPOINT(host:port),LOTUS_OTEL_EXPORTER_INSECURE(true/false)LOTUS_JAEGER_COLLECTOR_ENDPOINT,LOTUS_JAEGER_AGENT_HOST,LOTUS_JAEGER_AGENT_PORT,LOTUS_JAEGER_USERNAME,LOTUS_JAEGER_PASSWORD6831/udpto OTLP HTTP port4318; update env vars across all servicesexporters/jaeger v1.14.0, addexporters/otlp/otlptrace/otlptracehttp v1.38.0Additional Info
OTEL_*env vars (e.g.OTEL_EXPORTER_OTLP_HEADERSfor auth) nativelyChecklist