PerryLink/dsh-observe6

dsh-observe

OpenTelemetry and Langfuse observability exporter for DeepSeek Harness: turn/step/tool/LLM spans, token and cost metrics, and sanitized LLM prompt/completion capture from the session/event stream, with async batching, bounded offline buffering, and retry with backoff.

包名
dsh-observe
版本
0.2.12
许可证
Apache-2.0
最近更新
2026年9月12日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PerryLink/dsh-observe

Configuration

All tunables are Schemastery Config fields (changeable from cordis.yml). An id-targeted override replaces the whole row — restate every key you need. cordis.patch.yml documents each key inline.

KeyDefaultMeaning
enabledfalseMaster switch; true plus at least one backend is the explicit opt-in
otlpnullOTLP backend config, or null to disable it
otlp.endpoint(required)OTLP base URL; /v1/traces and /v1/metrics are appended
otlp.serviceNamedeepseek-harnessservice.name resource attribute
otlp.serviceVersion(none)service.version resource attribute
otlp.headers{}Extra headers merged into every export request
otlp.timeoutMs10000Per-request timeout
langfusenullLangfuse backend config, or null to disable it
langfuse.baseUrlhttps://cloud.langfuse.comLangfuse base URL
langfuse.publicKey(required)Project public key
langfuse.secretKey(required)Project secret key
langfuse.release(none)Release tag stamped onto traces
langfuse.traceNamesession {session} turn {turn}Trace-name template; {session}/{turn} interpolate per trace
langfuse.tags[]Static tags stamped onto every trace
langfuse.timeoutMs10000Per-request timeout
capture.turnstrueTurn lifecycle spans
capture.stepstrueStep lifecycle spans
capture.toolstrueTool-call spans with sanitized arguments/results
capture.llmtrueLLM generation spans
llm.prompttrueCapture the sanitized request prompt (false = sizes only)
llm.completiontrueCapture the sanitized completion (false = sizes only)
metadata.sessionIdtrueSession id attribute
metadata.cwdfalseSession working directory (a local path — off by default)
metadata.agentPresettrueAgent preset id attribute
metadata.modeltrueProvider/model attributes
metrics.tokenstruePer-provider/model token counters
metrics.costtrueUSD cost counters (need pricing rules to match)
metrics.contextTokenstrueContext-pressure gauge (needs ctx.tokenMeter)
pricing[]Pricing table, first match wins: { provider?, model, inputPerToken, outputPerToken, cacheReadPerToken?, cacheWritePerToken? }
sanitize.enabledtrueRedaction master switch (false disables redaction, never truncation)
sanitize.redactKeys[]Extra key-name substrings (key/token/secret/password/authorization/credential/apiKey are always included)
sanitize.redactPatterns[]Extra secret regular expressions
sanitize.truncatePromptChars4000Prompt character budget
sanitize.truncateCompletionChars4000Completion character budget
sanitize.truncateToolInputChars2000Tool argument character budget
sanitize.truncateToolOutputChars2000Tool result character budget
sanitize.truncateAttributeChars512Span attribute string budget
batch.maxRecords256Flush once the queue holds this many records
batch.flushIntervalMs5000Timer flush interval
batch.maxQueueRecords2000In-memory queue bound; excess spills to the buffer
batch.maxBufferRecords10000Durable offline buffer bound; oldest records drop first
batch.bufferRetryIntervalMs30000Offline buffer retry interval
retry.maxAttempts5Attempts per batch, including the first try
retry.baseDelayMs1000First backoff delay
retry.factor2Backoff multiplier per consecutive failure
retry.maxDelayMs60000Backoff ceiling
remote.enabledfalseMount the observe Typert remote (kill switch)