Skip to content

feat(observability): record every run to an OTLP collector by default - #310

Merged
Sam123ben merged 4 commits into
mainfrom
feat/otlp-run-recorder
Sep 3, 2026
Merged

feat(observability): record every run to an OTLP collector by default#310
Sam123ben merged 4 commits into
mainfrom
feat/otlp-run-recorder

Conversation

@Sam123ben

Copy link
Copy Markdown
Member

What

  • RunRecorder protocol in tesserix_adk.core with a process-wide default (install_default_recorder, default_recorder) and bound_session for grouping runs.
  • AgentRunner hands every run that reaches a terminal state to its recorder. Recorder failures are counted on recording_failures, never raised.
  • tesserix_adk.observability.otlp: OtlpSettings.from_env reads AGENT_TELEMETRY_*; build_spans turns a run into one Langfuse-shaped trace (agent root, generation/tool children, flagged events) with ids derived from the run id; OtlpRecorder queues spans behind a batch processor; install_from_env runs at import so any deployment that sets AGENT_TELEMETRY_ENDPOINT records without wiring.
  • New otlp extra (opentelemetry-sdk, opentelemetry-exporter-otlp-proto-http), included in all. Base install is unchanged.

Why

Every product was about to carry its own copy of the telemetry module. Putting it in the kit means one convention, one env contract, and traces from every agent by default.

Checks

make check is green apart from docs-check, which fails on a pre-existing untracked local ADR file that is not part of this change. Admission records, dependency floors and typing-policy entries added for the new extra.

Add a RunRecorder protocol with a process default, an OtlpRecorder that shapes a finished run into a Langfuse-ready trace, and AgentRunner hand-off on every terminal state. The recorder installs itself from AGENT_TELEMETRY_* when the kit is imported, so a deployment turns tracing on by setting an endpoint. Export is queued and fails open.
@Sam123ben
Sam123ben merged commit 688362a into main Sep 3, 2026
42 checks passed
@Sam123ben
Sam123ben deleted the feat/otlp-run-recorder branch September 3, 2026 10:52
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