dsh-plugin-langfuse: Langfuse observability as a community telemetry backend #1007
Replies: 3 comments 2 replies
|
This is exactly the seam backend we were about to ask for — thank you for building it. Context: we embed the dsh SDK runtime (stdio JSON-RPC) as one of several agent Three integration questions from the embedder seat:
Small compatibility note from our integration: the published |
|
Langfuse 遥测后端正好补上"成本/性能观测"的工具链缺口——和第 14 章(成本工程)的"测量方法"呼应。 已收录进手册生态章节 + 第 14 章工具推荐:https://github.com/Electricitysheep/dsh-handbook/blob/main/docs/14-cost.md |
|
不客气,好项目值得收录。有空欢迎来手册共建或投稿社区案例。 |
Uh oh!
There was an error while loading. Please reload this page.
Hi all 👋 — sharing a community plugin I just published: dsh-plugin-langfuse exports each dsh agent session to Langfuse as an OpenTelemetry trace tree.
What you see in Langfuse: each turn becomes a trace; each model step a generation (model, provider,
gen_ai.usage.*tokens including cache-read/reasoning, time-to-first-token from the first assistant chunk); tool calls become child spans of their step's generation; user messages become trace input; everything else — todo, plan, compaction, plugin events — lands as span events on the turn, so the timeline stays complete even for event types the plugin has never heard of.Install (published on npm as a profile bundle, prebuilt — no
allowBuildsneeded):Why a separate backend instead of pointing
session-telemetry-otelat Langfuse: the official backend exports OTLP logs, and Langfuse's OTLP endpoint accepts traces only. So this plugin implements the@deepseek-ai/dsh-session-telemetryseam as an alternative backend on the plain OTel traces SDK, with GenAI semantic-convention pluslangfuse.*attributes. Building on the seam (rather than instrumenting the LLM layer) keeps the redaction waterfall, theFEEDBACK_ONLYconsent semantics, and replay-identical trees — span timestamps come from the session log, never the wall clock.Testing: REAL-composition e2e following the official pattern (
dsh-app-boot+dsh-loader-smoke) — boots a real app via the Loader and asserts the OTLP payload a mock collector receives — plus a round trip against Langfuse Cloud.Compatibility: pins
@deepseek-ai/dsh-*@0.1.0-rc.6(developer preview, understood — I'll track the RCs).Deferred / open questions:
feedback/record→ Langfuse scores, subagent trace links, and multi-sink support (running Langfuse and the official backend at once would need a seam evolution — happy to discuss if there's upstream interest).Feedback, issues, and PRs welcome!
All reactions