Files
deepseek-harness/packages/telemetry
imccyu bff581ffb3 feat(telemetry): anonymous user id from $DSH_HOME/.userid, reported as OTel Resource user.id
session-telemetry-otel owns the identity as its own module (src/user-id.ts):
getOrCreateAnonymousUserId() returns the bare UUID line in $DSH_HOME/.userid,
minting a random UUID v4 on first use — synchronous IO with a process-lifetime
memo keyed by resolved path, an exclusive-create (wx) settle for concurrent
first launches, best-effort on read-only homes, and deletion resetting the
identity on the next launch by design.

The backend carries the id as the Resource's user.id (the OTel semconv user
attribute), once per export batch alongside service.name/service.version.
The identity belongs to the OTel feed alone; the dsh-sdk launcher telemetry
keeps its own separate store.
2026-07-31 14:28:03 +08:00
..

telemetry/

English | 中文

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/record waterfall (deployment-mounted redaction 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.