dsh-otel
by krimvp
DeepSeek Harness (dsh) OpenTelemetry 插件 — 代理运行、工具和模型调用的跟踪和指标
OpenTelemetry plugin for DeepSeek Harness (dsh) — traces and metrics for agent runs, tools, and model calls
安装
dsh plugin --profile web add github:krimvp/dsh-otelGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
OpenTelemetry plugin for DeepSeek Harness (dsh).
Status: early development. The plugin emits traces and metrics for the agent loop, the model calls, and the tool calls. The GenAI semantic conventions have the status
Development, so everygen_ai.*name can change. Expect breaking changes before version 0.1.0. DeepSeek Harness is also in developer preview.
What the plugin emits
Traces
| dsh concept | Span | Kind |
|---|---|---|
| Turn | invoke_agent |
INTERNAL, root of the trace |
| Step | dsh.step |
INTERNAL, child of the turn |
| Model call | chat {model} |
CLIENT, child of the step |
| Tool call | execute_tool {name} |
INTERNAL, child of the step |
Every span carries gen_ai.conversation.id, the dsh session id.
Metrics
| Instrument | Unit |
|---|---|
gen_ai.client.token.usage |
{token} |
gen_ai.client.operation.duration |
s |
gen_ai.execute_tool.duration |
s |
The plugin does not emit logs.
The harness already ships @deepseek-ai/dsh-session-telemetry-otel for logs.
The two packages work together.
docs/design.md gives the full attribute tables.
Install
dsh plugin --profile <name> add dsh-otel
Then mount the plugin in $DSH_HOME/profiles/<name>/cordis.patch.yml:
- insert:
- id: dsh-otel
name: dsh-otel
config:
endpoint: http://localhost:4318
insert adds a new entry.
A patch that names an id replaces the whole config of that entry.
Confirm the mount with dsh --profile <name> --dump-config.
The plugin needs @deepseek-ai/cordis and @opentelemetry/api as peers.
The plugin sets up its own tracer provider, meter provider, and OTLP HTTP exporters.
You do not need @opentelemetry/sdk-node.
Configuration
The config is flat and has exactly four options.
| Option | Type | Default | Meaning |
|---|---|---|---|
serviceName |
string | dsh |
The service name. OTEL_SERVICE_NAME wins over this option. |
endpoint |
string | http://localhost:4318 |
The OTLP HTTP base URL. The plugin uses it only when no OTLP endpoint variable is set. |
captureContent |
boolean | false |
Records the message content, the tool arguments, and the tool result. |
useGlobalProviders |
boolean | false |
true uses the @opentelemetry/api globals. The plugin then sets up no SDK. |
A standard environment variable wins over the config option.
| Variable | Effect |
|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT |
The base URL for both signals. The plugin then passes no URL to the exporters. |
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, OTEL_EXPORTER_OTLP_METRICS_ENDPOINT |
The URL for one signal, used as it is. |
OTEL_EXPORTER_OTLP_HEADERS, _TIMEOUT, _COMPRESSION, _CERTIFICATE |
Read by the exporters. |
OTEL_SERVICE_NAME, OTEL_RESOURCE_ATTRIBUTES |
Read by the plugin through the environment resource detector. |
OTEL_SDK_DISABLED=true |
The plugin does nothing. |
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true |
Turns the content capture on. |
OTEL_BSP_*, OTEL_TRACES_SAMPLER |
Read by @opentelemetry/sdk-trace-base. |
The content capture is off by default. The message content can hold user data and personal data.
Development
Read AGENTS.md before you contribute. That file gives the rules for the code, the configuration, and the commits.
Verify each change against the real local stack in otel/.
docker compose -f otel/docker-compose.yml up -d
npm run build
./e2e/verify.sh is the one-command local verification.
The script builds the plugin, runs two tasks in dsh against a mock model,
then reads the traces from Tempo and the metrics from Prometheus.
The script prints one PASS line or one FAIL line for each assertion.
docker compose -f otel/docker-compose.yml up -d
./e2e/verify.sh
The script mounts the fresh build from ./dist with a temporary patch.
The script installs nothing and changes no profile.
The header of the script lists the environment variables for the paths of
dsh, of DSH_HOME, and of the mock server.
Each variable has a default for the local playground.
License
MIT
原始 README: https://github.com/krimvp/dsh-otel/blob/main/README.md ↗
同类插件
查看全部 →
agent-vision-toolkit
为纯文本模型"看图“设计更好的视觉工具箱和技能,支持多图理解,图片问答,前端UI还原、GUI 自动化等,并可选无缝接入多个主流agent,直接识别粘贴图片| A vision toolkit and skill designed for text-only llms — image Q&A, long-screenshot OCR, frontend UI restoration, and GUI automation, with optional seamless integration for Codex, Claude Code, Pi, Oh My Pi, and OpenCode

api-relay-audit
从 DeepSeek Harness 对 AI API 中转站和 LLM 代理运行本地安全审计,生成 Markdown 报告,覆盖提示词注入、模型替换信号、工具调用改写、错误泄漏、流完整性和按 profile 启用的 Web3 风险。

OpenStory
✨ OpenStory 现已支持 DeepSeek Harness 插件! 现在可以通过 dsh-openstory 将 OpenStory 多智能体推演接入 DeepSeek Harness,让 agent 直接启动模拟、查看角色、下达指令并逐回合推进故事。查看 DSH 插件配置与使用指南。

phi
pi的编码代理 ∞ 提供者、子代理、hashline编辑和权限门

anysearch-dsh
DeepSeek Harness(DSH)的 AnySearch 网络搜索提供方与高级搜索工具。

codex-switch
Codex Switch 是一个 macOS 工具,一键配置 Codex 的自定义 API,同时保留官方 OpenAI 登录。保存后 Codex 的模型选择器里只会出现你选的那个 provider 的模型。也支持 Claude Code 的官方 / 自定义 API 切换。Codex Switch is a lightweight helper for configuring multiple coding-agent API routes. For Codex, it keeps Official OpenAI and a custom API provider configured in parallel, registers the custom model in Codex's mod