feat(telemetry): extend OTel log bridge to cover user application loggers
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 40/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- python
调研方向
Start by finding where Mellea attaches its OTLP log handler to the mellea.* logger hierarchy, and check how the MELLEA_LOGS_OTLP environment variable turns it on. Work out whether the handler can move to the root logger or be made configurable without duplicating records. Done means a record from a user's logging.getLogger(__name__) reaches the OTLP exporter with its trace and span IDs when MELLEA_LOGS_OTLP=true. The issue has no comments yet, so confirm the approach with maintainers before implementing.
由索引模型根据 Issue 内容生成。
描述
Mellea's OTel log bridge forwards only mellea-internal loggers to the OTLP log exporter. Log lines emitted by user application code via `logging.getLogger(name)` are formatted with `trace_id` / `span_id` on stdout (the OTel trace filter is applied) but are not forwarded to any configured OTLP exporter.
This breaks the "debug this one request" use case that structured logging is meant to enable. An operator sees an interesting span in their trace backend and wants to pivot to the correlated log lines from the application layer — business events, decision points, intermediate results — but those lines never reach the backend.
Observed behaviour (confirmed)
Application log calls such as:
logger = logging.getLogger(__name__)
logger.info("Triage: category=%s urgency=%s", result.category, result.urgency)
logger.info("Draft ready (%d chars)", len(draft_reply))
logger.error("Enrichment service unreachable: %s", exc_type, exc_info=True)
appear on stdout with `trace_id` and `span_id` fields, but do not appear in the OTLP log backend. Only mellea-internal log records (from `mellea.*` loggers) are exported.
Expected behaviour
Any logger in the application's logging hierarchy should have its records forwarded to the OTLP log exporter when `MELLEA_LOGS_OTLP=true`, so that application log lines appear alongside mellea's own internal logs in the backend, all correlated to their trace.
The fix is likely a change to which logger(s) the OTLP log handler is attached — attaching to the root logger (or making the attachment point configurable) would cover all application loggers without requiring any change to user code.
- 主要语言
- Python
- 星标
- 1.8k
- 派生
- 161
- 平均合并
- 4 天 3 小时
- 30 天内合并 PR
- 45
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
generative-computing/mellea 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
generative-computing/mellea#1864 ·
维护者通常 3 天内回复
-
bug: instruct() and react() replay tool-call turns without tool_calls可能已有人在做 @simonyang08 于 21 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 85/100
generative-computing/mellea#1784 · 1 条评论 ·
维护者通常 3 天内回复
-
Silently mangled docstrings: lone backslash line-continuations in non-raw docstrings collapse command examples可能已有人在做 @madhusudhan1260 于 18 天前认领。 未关闭good first issue p2
难度 2/5 1-3 小时 新手友好度 82/100
generative-computing/mellea#1780 · 2 条评论 · 已指派 1 人 ·
维护者通常 3 天内回复
-
area/telemetry enhancement p2
难度 2/5 1-3 小时 新手友好度 66/100
generative-computing/mellea#1210 ·
维护者通常 3 天内回复
-
area/requirement area/stdlib enhancement p2
难度 2/5 1-3 小时 新手友好度 62/100
generative-computing/mellea#31 · 2 条评论 ·
维护者通常 3 天内回复
查看 generative-computing/mellea 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
ActivityWatch/docs#223 ·
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier capture可能已有人在做 @jianyx1 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
volcengine/OpenViking#8354 ·
维护者通常 1 天内回复
-
comp/tools P2 tool/skills type/bug
难度 2/5 1-3 小时 新手友好度 78/100
NousResearch/hermes-agent#159541 ·
维护者通常 1 天内回复
-
bot-triaged module: correctness (silent) module: cpu module: empty tensor module: loss triage review
难度 1/5 1 小时以内 新手友好度 80/100
维护者通常 1 天内回复
-
request-theme
难度 2/5 1-3 小时 新手友好度 62/100
LizardByte/ThemerrDB#10167 · 1 条评论 ·