title
EDD production telemetry & continuous monitoring
kind
sop
triggers
tools

Standard Operating Procedure: EDD Production Telemetry

Local and CI evals protect predefined intents. Production is unpredictable. Close the EDD loop by using the same attribute schema for agent spans and eval datasets - so yesterday's incident becomes tomorrow's passing case.

Mechanisms

  1. Standardized span emitting - emitAgentSpan records prompt, routing confidence, JSON tool payload, latency, and tokens (kit.* attributes). Sample span: evals/edd/examples/otel-agent-loop.json. Export to an OTLP collector with kitSpanToOtlpJson when you already run one.

  2. Asynchronous shadow evals - Do not judge every live prompt inline. Sample with shouldShadowEval(0.05) / kit eval shadow --infile … --sample 0.05. Example corpus: evals/edd/examples/prod-turns.jsonl.

  3. Prod → JSONL (triage, then promote) - On unhandled tool exceptions, circuit-breaker trips, user downvotes, or shadow_fail, run productionTraceToJsonl / kit eval dataset from-trace. Do not append --out JSONL onto CI seeds or holdout. Open each candidate:

    DecisionWhenWhere it goes
    KeepNew matrix cell or a real miss with a human expectWorking golden (evals/edd/goldens/write-cases.mjs → regenerate). Tag prod-derived.
    DropDuplicate prompt+expect, junk prompt, unlabeled toolDiscard
    HoldoutOnly when freezing a scored slicearchitecture_routing.holdout.jsonl — never while tuning a prompt

    Catalog example of a promoted miss: prod-cb-01 in architecture_terminal.jsonl. Live architecture ranking: evals/edd/goldens/README.md.

  4. Trajectory parity - Multi-step failures should preserve ordered tool calls in history so plan_adherence / trajectory reports can name the failing step after promotion.

  5. Routing drift detection - Compare tool-share distributions with detectRoutingDrift. Alert when e.g. read_architecture_yaml drops from ~30% to ~2% traffic.

Try the closed loop locally

kit eval shadow --infile evals/edd/examples/prod-turns.jsonl --sample 1 --seed 1 --out out/shadow-fails.jsonl
kit eval dataset from-trace --trace evals/edd/examples/prod-trace.json --out out/prod.jsonl

Fixtures: examples/otel-agent-loop.json, examples/prod-turns.jsonl, examples/prod-trace.json.

Dashboard signals

SignalAlert whenWhere
Routing accuracy (shadow)Below CI threshold (default 95%)Shadow job / kit.passed on sampled spans
Hallucination rate (judge)Sustained rise vs baseline weekShadow fails tagged shadow_fail
Circuit-breaker tripsSpike vs 7-day baselineSpans / cases with circuit_breaker
Tool share driftAbsolute drop ≥ 20 ppAggregate kit.tool_namedetectRoutingDrift
Safety suiteScripted gate or nightly live failsCI

Filter production spans / turns by attributes kit.case_id, kit.tool_name, kit.passed (and service.name=kit-edd when using OTLP).

Closed loop

Yesterday's incident → triage → working golden (prod-derived) → live kit eval run → green before release. Do not auto-append onto CI seeds or holdout. Redact secrets from uploaded eval reports (harness redacts API-key-like strings in Markdown artifacts).

Markdown source