Conversation
Wire EventBus fan-out to a real OpenTelemetry OTLP sink when OTEL_EXPORTER_OTLP_ENDPOINT is set, with zero SDK cost when unset and graceful degradation if chorus[otel] is missing. Co-authored-by: Cursor <cursoragent@cursor.com>
Always fan the EventBus to an OTLP sink (default localhost:4318). Opt out with OTEL_SDK_DISABLED=true; OTel packages are core deps. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
Closing: implements OTLP export as default-on ( |
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
Implements chorus spec 08 §4, and default-on rather than opt-in: the OTel SDK is a core dependency and
Choruswireswith_otel_exportunless you disable it.OtelSpanSinkmapsrun.*/llm.call/ subagent events onto a nested beat span tree, with the eval verdict landing on the root aschorus.eval.*. Wired through CLI beats, role chat and theChorusfacade. Plain OTLP/HTTP — works with Langfuse / Tempo / Jaeger, no vendor SDK lock-in. Opt out withOTEL_SDK_DISABLED=true.Note the default-on tradeoff measured on the dream side (dream#93): span creation is sub-millisecond, but with no collector on
:4318the exporter retries and adds ~6 s at process shutdown. SetOTEL_SDK_DISABLED=truein environments without a collector.This is chorus's own provider/exporter/event-mapping surface, not a duplicate of dream's: dream exposes generic tracing primitives (
Tracer,JsonlTracer,TraceWriter), not an OTLP provider API, so there is nothing to reuse yet. If a shared OTLP seam is wanted, it should land as an explicit dream public API first and chorus should migrate to it in a separate change.Also included: the Postgres test fixture started
pg_ctlwithout overridingunix_socket_directories, so it tried to create its socket lock under/var/run/postgresqland failed in any unprivileged environment; it now allocates a writable temp socket dir.Companion dream PR: Arceus-Inc/dream#93
Test plan
uv sync --all-extras --devCHORUS_PG_BIN=... uv run pytest tests/observability/test_otel_export.py -q— 7 passeduv run python evals/otel/eval_step1_chorus_otlp.pyuv run ruff check src tests/uv run mypy— clean (60 files)OTEL_EXPORTER_OTLP_ENDPOINTat a local collector and run one beatLink to Devin session: https://app.devin.ai/sessions/4f7deb4af0914056a24a4d660a661713
Requested by: @divo12