Feature: configurable trace tags (filter traces by agent/tool in shared projects)
@bezbac がすでに取り組んでいます。
2026年8月31日 から。
評価
この issue はまだ評価されていません。
説明
Problem
The plugin exports traces without any tags. In a shared Langfuse project that receives traces from multiple agent tools (Claude Code, OpenCode, Hermes, Codex...), there is no way to filter traces by which tool produced them.
Notably, the Claude Code plugin already hardcodes a claude-code trace tag on every trace, so traces from different tools are inconsistently filterable.
For example — we self-host Langfuse and aggregate traces from several coding agents into one project. Claude Code traces can be filtered by tag, OpenCode traces cannot:
| Tool | Trace tags in UI |
|---|---|
| Claude Code plugin | claude-code |
| OpenCode plugin | (none) |
Proposed solution
Add an optional tags field to the credentials config (~/.config/opencode/opencode-langfuse.json):
{
"publicKey": "pk-lf-...",
"secretKey": "sk-lf-...",
"tags": ["opencode", "production"]
}
plus a LANGFUSE_TAGS env var (comma-separated) for env-only setups, mirroring the existing env-var pattern (LANGFUSE_USER_ID, LANGFUSE_SERVICE_NAME, ...).
Implementation: a makeTraceTagsSpanProcessor following the existing makeUserIdSpanProcessor pattern, setting the langfuse.trace.tags OTTL attribute on every span — @langfuse/core's OTEL endpoint maps this attribute to Langfuse trace tags.
Workaround currently in use
Manually patching dist/index.js in the opencode plugin cache to add one span.setAttribute("langfuse.trace.tags", ...) line. Works, but is wiped on every plugin update.
Use case: multi-agent observability rollouts where one Langfuse project serves a whole team's coding agents and dashboards/queries filter by agent type.
I have a PR ready implementing this (config file + env var, merged & de-duplicated, capped at 50 tags, README updated).
- 主要言語
- TypeScript
- スター
- 30
- フォーク
- 18
- 平均マージ
- 4時間 24分
- マージ済み PR(30日)
- 5
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
langfuse/opencode-observability-plugin のほかの issue
-
feat-agents feature Improvement integration-opencode internal-analytics
langfuse/opencode-observability-plugin#38 · コメント 3 件 · リアクション 2 件 · 担当者 1 名 ·
langfuse/opencode-observability-plugin の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
bcgov/bc-wallet-mobile#4761 · コメント 1 件 ·
-
external-issue to-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100