Skip to content

feat: OTEL traces (OTLP push) + mesh-aware request/trace ids - #28

Merged
donkeyx merged 4 commits into
masterfrom
feat/otel-traces
Aug 10, 2026
Merged

donkeyx merged 4 commits into
masterfrom
feat/otel-traces

Conversation

@donkeyx

@donkeyx donkeyx commented Aug 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

Separate feature release from v2.4.0 — OpenTelemetry traces via OTLP push to Alloy/Tempo. Metrics stay on scraped /metrics.

Push vs scrape

  • Metrics: scrape GET /metrics → Alloy/Prometheus → Mimir
  • Traces: app pushes OTLP → Alloy → Tempo (not scraped)

Mesh / Istio detail (called out in README + release notes)

  • x-request-id (Envoy/Istio) ≠ OTEL trace id (X-Trace-Id)
  • We propagate W3C + B3 + Jaeger so Istio-era and modern traffic both link
  • Mesh request id is a span attribute + echoed on the response; logs include trace_id + request_id for joins
  • Tempo: search by trace id, or attribute http.request_id

Also in this PR

  • No-op until OTEL_EXPORTER_OTLP_ENDPOINT is set
  • Startup log line otel config (effective) with all relevant params/defaults
  • Skip noisy probe paths unless OTEL_TRACE_PROBES=true
  • /a/proxy uses otelhttp for east-west linked spans
  • k8s manifest sample env + full Observability docs

Suggested 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)
  • CI docker + CodeQL green
  • optional: Alloy + Tempo smoke with X-Request-Id + X-Trace-Id

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.
@donkeyx donkeyx changed the title feat: OTEL traces (OTLP push to Alloy/Tempo) feat: OTEL traces (OTLP push) + mesh-aware request/trace ids Aug 10, 2026
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.
@donkeyx
donkeyx merged commit 093285c into master Aug 10, 2026
3 checks passed
@donkeyx
donkeyx deleted the feat/otel-traces branch August 10, 2026 12:10

This branch was previously deployed

1 inactive deployment
ci — d366ae3b Deployed Aug 10, 2026 by donkeyx via docker #59
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