Files
deepseek-harness/packages/telemetry
kingwl ec38cac8ef fix(telemetry): emit the shutdown marker at the session's own disposal edge
Review finding (Codex P1), pinned red-first: the marker was tied to
telemetry-plugin lifetime, but receivers key crash detection on its
absence per session. A normally closed session in a long-running host
retired silently (classified as a crash once stale), while a telemetry
reload marked every still-live session as cleanly ended.

The session/disposed handler now emits the marker at the session's own
termination edge before retiring it; the dispose-time sweep only marks
sessions still alive at application teardown (their own edge would fire
unobserved). READMEs restate the marker semantics: telemetry stopped
observing cleanly — a marker followed by more session events is a
telemetry reload, not a session restart.
2026-07-25 21:21:45 +08:00
..

telemetry/

Outbound session reporting: the telemetry seam plus its OpenTelemetry backend. The design — the boundary axiom (the harness's aspect ends at emit(); delivery is the reporting SDK's), the telemetry/redact waterfall (deployment-mounted rules; the seam ships none), the fixed chunk projection, the handoff cursor, and the operational-record channel — is pinned in the revival Agent Note.

Package Role
@deepseek-ai/dsh-session-telemetry The seam: capture points, projection, redaction, handoff cursor, ops signals, and the minimal backend contract (emit/flush?/shutdown).
@deepseek-ai/dsh-session-telemetry-otel The backend a deployment loads: the OTel JS SDK's log pipeline (LoggerProvider + BatchLogRecordProcessor + OTLP/HTTP exporter), configured verbatim through passthroughs.