feat: OTEL traces (OTLP push) + mesh-aware request/trace ids - #28
Merged
Merged
Conversation
Traces are pushed over OTLP (http/protobuf or grpc), not scraped — metrics stay on GET /metrics. Enable with OTEL_EXPORTER_OTLP_ENDPOINT; no-op when unset. Gin inbound spans + otelhttp on /a/proxy for east-west context propagation.
Probe/metrics/ping paths are not traced by default (OTEL_TRACE_PROBES to opt in). Responses get X-Trace-Id for Tempo correlation. Sample manifest documents Alloy OTLP env vars.
… config log Install composite propagators so Istio/Envoy B3 and W3C both join spans. Attach x-request-id / correlation ids as span attrs and echo them with X-Trace-Id. Log full effective OTEL env on every boot. Request logs include trace_id + request_id for log↔Tempo joins.
Spell out Istio x-request-id vs OTEL X-Trace-Id, log/Tempo join steps, and ship RELEASE-v2.5.0.md for the separate release after this PR merges.
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Separate feature release from v2.4.0 — OpenTelemetry traces via OTLP push to Alloy/Tempo. Metrics stay on scraped
/metrics.Push vs scrape
GET /metrics→ Alloy/Prometheus → MimirMesh / Istio detail (called out in README + release notes)
x-request-id(Envoy/Istio) ≠ OTEL trace id (X-Trace-Id)trace_id+request_idfor joinshttp.request_idAlso in this PR
OTEL_EXPORTER_OTLP_ENDPOINTis setotel config (effective)with all relevant params/defaultsOTEL_TRACE_PROBES=true/a/proxyuses otelhttp for east-west linked spansSuggested tag after merge
v2.5.0 — release body ready (mesh id vs trace id called out clearly).
Test plan
go test ./...without OTEL endpoint (no-op)X-Request-Id+X-Trace-Id