Skip to content

Standard OTLP/HTTP trace receiver - #56

Merged
josedaniel-dev merged 1 commit into
mainfrom
feat/otlp-receiver
Oct 16, 2026
Merged

josedaniel-dev merged 1 commit into
mainfrom
feat/otlp-receiver

Conversation

@josedaniel-dev

Copy link
Copy Markdown
Collaborator

Step 5 of docs/roadmap.md.

  • POST /v1/otlp/v1/traces: OTLP/HTTP, protobuf (the usual default) or JSON, gzip/deflate, ExportTraceServiceResponse with partialSuccess. Set OTEL_EXPORTER_OTLP_ENDPOINT=http://host:8100/v1/otlp; auth via OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer …. gRPC is out of scope.
  • It translates OTLP spans into the existing manitos.telemetry.v1 envelope and reuses its ingestion (extracted as apply_envelope, route unchanged), so idempotency, upsert and the dashboard are shared. Trace id → UUID; span id → stable derived UUID, so a retry updates instead of duplicating.
  • GenAI / OpenInference conventions map to span types (llm, tool, agent, embedding…), token counts and model; tool spans are named after the tool, so they feed the test-case checks and observer-regression.
  • Spans of one trace may arrive in several batches: the trace keeps its full time range and a child links to a parent stored earlier. A rejected trace (e.g. owned by another project) leaves no receipt (savepoint) and is counted in rejectedSpans.
  • Privacy: metadata-only by default. OBSERVATORY_OTLP_CAPTURE=metadata drops content-like attributes (prompt, completion, content, message, input, output, url, path, token, key…) before storage; full keeps them. The filter checks names, not values — documented as a safety net in docs/otlp.md.
  • New dependency: opentelemetry-proto>=1.27,<2 (brings protobuf).

Tests: translation, privacy, protobuf+gzip, JSON, retries, multi-batch linking, error paths, project conflict. Backend 203 passed, ruff clean. Verified with a stock opentelemetry-sdk + opentelemetry-exporter-otlp-proto-http app: trace, spans, token counts and a tool span arrived; the prompt attribute did not.

No migration and no dashboard change.

POST /v1/otlp/v1/traces accepts protobuf or JSON (gzip/deflate) from any stock OpenTelemetry
exporter and translates spans into the existing manitos.telemetry.v1 envelope, reusing its
idempotent ingestion. GenAI conventions map to span types, tokens and tool names. Metadata-only by
default: content-like attributes are dropped (OBSERVATORY_OTLP_CAPTURE=full keeps them). Spans of a
trace may arrive in several batches. Adds opentelemetry-proto. Roadmap step 5 done; mapping in
docs/otlp.md.
@josedaniel-dev
josedaniel-dev merged commit 830a68a into main Oct 16, 2026
5 checks passed
@josedaniel-dev
josedaniel-dev deleted the feat/otlp-receiver branch October 17, 2026 01:49
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