Feature: configurable trace tags (filter traces by agent/tool in shared projects)
@bezbac đang làm issue này rồi.
Từ ngày 31/8/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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).
- Ngôn ngữ chính
- TypeScript
- Star
- 30
- Fork
- 18
- Merge trung bình
- 4 giờ 24 phút
- Pull request đã merge (30 ngày)
- 5
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của langfuse/opencode-observability-plugin
-
feat-agents feature Improvement integration-opencode internal-analytics
langfuse/opencode-observability-plugin#38 · 3 bình luận · 2 reaction · 1 người được giao ·
Tất cả issue của langfuse/opencode-observability-plugin
Issue tương tự
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Crush Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ElementsProject/cln-application#167 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Quantco/pnpm-licenses#17 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100