Skip to content

feat: implement Level 3 distributed tracing — content capture #5948

Description

@dhshah13

What this tracks

Implementation of Level 3 distributed tracing — content capture in spans — per the activation contract in ADR 0084 (PR #5947). Sibling of #2577 (Level 1) and #2862 (Level 2).

Level 1 and Level 2 are live: every run produces run-telemetry.jsonl, and OTLP export ships metadata spans to any configured backend. Level 3 adds prompt/message/tool content to the existing per-iteration agent spans, gated by dual consent (operator env + per-agent harness) plus an allow-listed destination, fail-closed on unsatisfiable capture requests, with secret redaction at assembly and no reasoning capture.

Preconditions (gate real content flowing, not implementation)

Phased plan

  1. Rendering spike against the non-prod MLflow (post-fix(telemetry)!: respect OTEL variables default behaviour #5562 export environment): verify JSON-string GenAI attributes render as span inputs/outputs, and which span feeds the trace-list preview — no fullsend code
  2. Sandbox env denylist (tracked separately — ADR 0085's implementation issue)
  3. Gates and export guards: env-mode parsing, harness telemetry.content_capture, endpoint allow-list, metadata allow-list on the file exporter, redaction-marker check on the OTLP path — merges inert
  4. Capture pipeline: transcript parsing to GenAI message attributes behind a runtime content adapter, redaction at assembly with findings, caps and truncation
  5. Validation-environment e2e + pilot agents, building on the otlpsink wire-test harness

Every implementation PR merges inert: without the allow-list org variable, no capture request can succeed.

Out of scope

Reasoning/thinking capture (excluded by ADR 0084; extending scope requires a new ADR), backend-specific attribute coupling, and the quality-evaluation tier (ADR 0050's scope boundary).

Relates to #2862, #5361, #294.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions