跳到正文

linyp/dsh-plugin-langfuse

40最近提交 2026年8月15日

dsh-plugin-langfuse DSH 插件

该插件将 Langfuse 可观测性集成到 DeepSeek Harness (dsh) 中。它将每个回合导出为 OpenTelemetry 追踪,按会话分组,记录反馈作为 Langfuse 评分,并保留 fork/subagent 继承关系。它实现了框架的公共遥测接口,作为官方 OTLP 日志导出器的替代后端。

如何安装 dsh-plugin-langfuse DSH 插件

dsh plugin --profile web add dsh-plugin-langfuse

复制不会执行命令。安装 dsh-plugin-langfuse DSH 插件前请核对仓库和版本。

dsh-plugin-langfuse DSH 插件数据来源

dsh-plugin-langfuse DSH 插件快照日期:2026年8月16日

discovered

dsh-plugin-langfuse DSH 插件能做什么

  • 将每个回合导出为 OpenTelemetry 追踪,包含模型步骤生成和工具调用跨度。
  • 按会话(langfuse.session.id)分组回合,保留 fork/subagent 继承关系。
  • 当启用 feedbackScores 时,记录用户反馈作为 Langfuse TEXT 评分(会话级别)。
  • 支持 FEEDBACK_ONLY 模式:仅在用户记录反馈时导出会话日志,确保同意。

dsh-plugin-langfuse DSH 插件适合哪些场景

  • 在 Langfuse 中监控 AI 代理会话,用于调试和性能分析。
  • 使用关联配置(userId/sessionId)将 dsh 追踪与宿主应用程序追踪关联。
  • 启用反馈驱动的可观测性:仅在用户提供反馈后导出追踪,减少数据传输。

dsh-plugin-langfuse DSH 插件适合谁

  • 使用 DeepSeek Harness 构建 AI 代理并需要详细可观测性的开发者。
  • 将 dsh 嵌入更大系统并需要在 Langfuse 中统一追踪的平台团队。

dsh-plugin-langfuse DSH 插件的限制

  • 需要 Langfuse 项目密钥(LANGFUSE_PUBLIC_KEY 和 LANGFUSE_SECRET_KEY);密钥是区域限定的,必须与 LANGFUSE_HOST 区域匹配。
  • 配置错误(缺少 URL、无效认证、未知模式等)会导致插件加载失败,无运行时回退。
  • 环境变量在启动时读取;已运行的实例在安装后必须重启。

dsh-plugin-langfuse DSH 插件的仓库 README 摘录

以下文字摘自 dsh-plugin-langfuse DSH 插件的上游仓库 linyp/dsh-plugin-langfuse 的 README,版权归原作者,仅作引用。

English | [中文](README.zh.md) [Langfuse](https://langfuse.com) observability for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`): exports each turn as an OpenTelemetry trace — model step → generation, tool call → tool span — groups turns by session, records canonical feedback as Langfuse Scores, and preserves fork/subagent lineage. This is a community plugin (`dsh-plugin` topic), not part of the official repository. It implements the harness's public telemetry seam (`@deepseek-ai/dsh-session-telemetry`) as an alternative backend to the official OTLP-logs exporter. ## Install The commands below assume the installed `dsh` CLI. Running the official harness from a [source checkout](https://github.com/deepseek-ai/deepseek-harness) instead? Run each of them as `pnpm dsh …` from the checkout root (after its `pnpm run build`) — same commands, same `web` profile. As a profile bundle (the package ships a `cordis.patch.yml` patch layer): ```sh dsh plugin --profile web add dsh-plugin-langfuse export LANGFUSE_PUBLIC_KEY=pk-lf-… export LANGFUSE_SECRET_KEY=sk-lf-… # optional, defaults to https://cloud.langfuse.com (EU region); note the plugin # reads LANGFUSE_HOST

阅读完整 README仓库许可: MIT

dsh-plugin-langfuse DSH 插件常见问题

如何安装 dsh-plugin-langfuse?

运行 `dsh plugin --profile web add dsh-plugin-langfuse` 并设置所需的环境变量(LANGFUSE_PUBLIC_KEY、LANGFUSE_SECRET_KEY),然后重启 dsh。插件在启动时读取环境变量。

需要哪些环境变量?

需要 LANGFUSE_PUBLIC_KEY 和 LANGFUSE_SECRET_KEY。可选设置 LANGFUSE_HOST(默认为 https://cloud.langfuse.com,欧盟区域)。注意插件读取的是 LANGFUSE_HOST,而不是 LANGFUSE_BASE_URL。

如何启用反馈评分?

配置文件包在项目密钥都存在时启用反馈评分。对于显式配置,在 cordis.yml 行中设置 `feedbackScores.enabled: true`。插件还需要有效的评分 URL 和队列参数。

能否将 dsh 追踪与宿主应用程序的追踪关联?

可以,使用 `correlation` 配置设置 userId 和 sessionId,这些值将标记在每个导出的跨度上,作为 langfuse.user.id 和 langfuse.session.id。每回合也可以通过记录属性覆盖。

配置错误会怎样?

插件在加载时失败并显示描述性错误,不会构造任何传输,插件不会启动。例如缺少导出器 URL、无效认证或未知模式等。