Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

feat(observability): token/成本归集只存在于 Langfuse 链路——引擎与 console 零字段,未开 Langfuse 的部署成本完全不可见

Open
#37 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start by reading obs.py:496-518 and :549-551, then trace ExecutionState in storage/base.py and the worker terminal path in flow_worker.py:1920-1928. Review local_executor.py:297-322 and console models/flow.py:185-212 to understand current Langfuse and execution storage. Done means usage is retained without Langfuse and the console shows per-node and run-level totals while Langfuse remains a deep link.

Written by the indexing model from the issue text.

Description

场景 gap 单(okguitar 提报)· 优先级 P1 · 依赖:无

基线 HEAD = ddcedae。

Summary

  • usage 唯一去处在 obs.py:496-518(llm 形状输出 → Langfuse generation usage_details)与 :549-551(agent 子事件),由 Langfuse 服务端聚合——plaita 自己的存储不落任何 usage:ExecutionState(storage/base.py)无 usage/cost 字段(grep 证实)、$NODE 无、console LocalExecution 表(models/flow.py:185-212)无;console 后端 grep usage|token|cost 除 obs_link 外零命中。
  • 开关默认关:local 档 _build_langfuse_callback 默认 auto(无 LANGFUSE_PUBLIC_KEY 即不观测,local_executor.py:297-322);worker 侧需显式 PLAITA_WORKER_LANGFUSE=1(flow_worker.py:1920-1928)。

影响

未启用 Langfuse 的部署里,每天几十 run 的 token 消耗在系统任何地方都不可见;启用了也没有 run 级成本报表/阈值告警——数小时 AGENTRUN 失控循环只能事后去 Langfuse 手工聚合。

建议

worker 终态时把各节点 usage 聚合写进 ExecutionState(如 usage_json),console 执行详情页展示 per-node/run 两级汇总;Langfuse 退为深链(obs_link 已具备);在此基础上才能谈 per-tenant 配额(见配额配套单)。

Dominant language
Python
Stars
0
Forks
1
Avg merge
1h 44m
Merged PRs (30d)
7

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jeffkit/plaita

All issues in jeffkit/plaita

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.