feat(observability): OTLP exporter + collector docs#475
Merged
ALRubinger merged 1 commit intomainfrom May 6, 2026
Merged
Conversation
Adds the production trace destination Aileron was missing. With AILERON_OTEL_EXPORTER=otlp, spans ship to an OpenTelemetry Collector via OTLP/HTTP — the path that fans out to Grafana / Datadog / Honeycomb / Jaeger / Tempo / etc. without bespoke integration. The exporter honors the standard OTEL_EXPORTER_OTLP_* env vars (ENDPOINT, HEADERS, INSECURE, TIMEOUT) directly via the OTel SDK. No Aileron-prefixed alternatives — anyone running an OTel collector already has these in their environment, and forking the names would force them to maintain two parallel sets. Implementation: ~10 lines added to internal/observability/tracing.go's newExporter switch. otlptracehttp (HTTP/protobuf) over otlptracegrpc to keep the dep tree light and play nicely with proxies. Initial construction is lazy — connection failures surface on first ExportSpans, which the SDK retries; daemon startup never blocks on collector reachability. Tests: - TestNewExporter_DispatchesOTLPByConfig — dispatch wiring - TestOTLPExporter_PostsToCollectorEndpoint — full round-trip against an httptest server impersonating an OTLP collector; asserts POST to /v1/traces with application/x-protobuf body - TestLoadObservabilityConfig_AcceptsOTLPExporter — config parsing Coverage: internal/observability 90.7%, internal/config 96.1%. Docs: - New top-level "What is OpenTelemetry?" section above the audit log so readers without prior OTel familiarity get oriented before either surface is described. Defines OTel, traces/spans, OTLP, OTel endpoints, and the collector-fan-out value prop. - New "Hooking up to a collector" subsection with three concrete examples: local dev (docker run otel/opentelemetry-collector- contrib), Honeycomb, Grafana Cloud. Names the OTEL_EXPORTER_OTLP_* env vars users need to know. - Configuration table updated with OTLP row and the standard env vars. Closes the original "configurable endpoint" goal of #390 — the issue itself was already closed but this completes the production deployment story it described. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
🚅 Deployed to the aileron-pr-475 environment in aileron
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #475 +/- ##
==========================================
+ Coverage 82.24% 83.10% +0.85%
==========================================
Files 234 234
Lines 24127 24129 +2
==========================================
+ Hits 19843 20052 +209
+ Misses 3148 2924 -224
- Partials 1136 1153 +17
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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
Adds the production trace destination Aileron was missing. With
AILERON_OTEL_EXPORTER=otlp, spans ship to an OpenTelemetry Collector via OTLP/HTTP — the path that fans out to Grafana / Datadog / Honeycomb / Jaeger / Tempo / etc. without bespoke integration.Closes the "configurable endpoint" goal of #390 (the issue itself was closed earlier; this completes the production deployment story it described).
Why HTTP, why no Aileron prefix
OTEL_EXPORTER_OTLP_*directly — no Aileron-prefixed alternatives. Anyone running an OTel collector already has these env vars in their environment; forking the names would force them to maintain two parallel sets.Usage
Local dev:
Managed backends use
OTEL_EXPORTER_OTLP_HEADERSfor auth — Honeycomb, Grafana Cloud, Datadog all show concrete examples in the docs.Docs restructure
This PR also restructures the Observability guide:
docker runexample for local dev plus Honeycomb and Grafana Cloud production examples.OTEL_EXPORTER_OTLP_*env vars (headers, insecure, etc.) so users have everything in one reference.Test plan
TestOTLPExporter_PostsToCollectorEndpoint— full round-trip against anhttptestserver impersonating an OTLP/HTTP collector; asserts POST to/v1/traceswithapplication/x-protobufbodyTestNewExporter_DispatchesOTLPByConfig— config dispatch wiringTestLoadObservabilityConfig_AcceptsOTLPExporter— config parsinginternal/observability90.7%,internal/config96.1%go test ./...— full internal-module sweep greencmd/*modules build cleanlytask build:docs— 55 pages, no errors🤖 Generated with Claude Code