TGYD-helige/dsh-plugins--packages-dsh-langfuse ↗★ 2

@amaster.ai/dsh-langfuse

Langfuse 链路追踪与可观测性插件 适合需要对 LLM 调用、工具执行及会话进行详细追踪与性能分析的开发者。

套件
@amaster.ai/dsh-langfuse
相容性
待驗證
Harness 依賴範圍
>=0.1.5-rc.1 || >=0.1.6-alpha.1 || >=0.1.7-alpha.1 || >=0.2.0-rc.1
Cordis 依賴範圍
^4.0.1
版本
0.1.0
授權
MIT
最近更新
2026年9月29日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:TGYD-helige/dsh-plugins#c5e90b86403a6463b8459173dc2d187f8c78b067&path:packages/dsh-langfuse

Configuration

Disabled by default. Configure via the profile's cordis.patch.yml:

- insert:
    - id: langfuse
      name: '@amaster.ai/dsh-langfuse'
      config:
        enabled: true
        publicKey: pk-lf-...
        secretKey: sk-lf-...            # secret role
        baseUrl: https://cloud.langfuse.com
        traceName: dsh-turn
        captureContent: true            # set false to record metadata only

Buffered spans drain on session/flush(session); the exporter shuts down with the plugin fiber.

With captureContent: true, both llm-call and llm-request inputs contain every llm/stream request option except the non-serializable AbortSignal. New request fields pass through without a plugin update. Langfuse's separate generation modelParameters attribute summarizes the known sampling fields; it is not part of either request input. These are dsh-side values, not exact provider HTTP payloads: adapters may add defaults, project messages/tools, or rename fields after this seam. With captureContent: false, inputs keep structural counts while the separate modelParameters attribute keeps safe parameter metadata.

Hook spans appear when a dsh hook bridge emits the paired session records. The current hook/result record does not contain stdout; successful script output can appear in the LLM request when the bridge injects it as context, while the hook span reports decision, exit code, duration, and bounded stderr. SessionStart runs before the first turn and does not emit these records, so it has no hook span.

Observability is a no-throw seam: backend errors are logged with a [dsh-langfuse] prefix and never escape into the agent loop.