feat(telemetry): add complete adapter-function lifecycle observability

未关闭
#1,466 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
python
领域
observability

调研方向

The issue does not name implementation files or tests. When resumed, first read the adapter implementations for LocalFile, Embedded, and ServerMediated and the existing phase-duration metric producers; map their real lifecycle and outcome paths before proposing changes. Done means lifecycle semantics are documented, spans and metrics agree, and tests cover each supported adapter’s success and failure paths.

由索引模型根据 Issue 内容生成。

描述

area/adapter-functions area/telemetry enhancement p2 triage/accepted

Status

Deferred on 2026-08-27. This is now independent backlog work, not an active Epic #929 deliverable.

The reviewed draft PR #1558 implemented LocalFile activation/deactivation spans through the hook/plugin pattern, but that is only one slice of adapter observability. It was closed rather than merged because the broader capability needs a coherent lifecycle and metric contract across adapter realities.

Problem

Mellea needs useful, truthful observability for adapter-function work across LocalFile, Embedded, ServerMediated, and future bindings. The existing phase-duration metrics and any future spans must describe the same lifecycle without counting setup work as function invocation or fabricating an outcome before one exists.

Scope when resumed

  • Define lifecycle boundaries and invocation semantics for each adapter reality.
  • Add spans only where a real invocation outcome is available.
  • Preserve existing metric-only events where no matching invocation exists.
  • Cover LocalFile setup, activation, generation, parsing, and release as appropriate.
  • Add equivalent observability for Embedded and future adapter realities when their real outcome paths are known.
  • Decide whether content capture and metric exemplars are worth supporting, then make their trace context explicit.

Out of scope

  • A LocalFile-only activation/deactivation slice.
  • Treating setup work as an adapter-function invocation merely to create a span.
  • Inventing spans for metric-only request edits.

Acceptance criteria

  • Each supported adapter reality has documented lifecycle and invocation semantics.
  • Spans and metrics agree on what counts as an invocation and a phase.
  • No backend imports telemetry.tracing; plugins own span creation.
  • Metric-only producers remain valid without fabricated trace correlation.
  • Tests cover each supported adapter reality and its failure paths.
主要语言
Python
星标
1.8k
派生
161
平均合并
4 天 3 小时
30 天内合并 PR
45

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

generative-computing/mellea 的其他 Issue

查看 generative-computing/mellea 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。