Skip to content

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

Open

Description

@planetf1

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.

Activity

  1. self-assigned this
    on Jul 29, 2026
  2. added
    enhancementNew feature or request
    area/telemetryOTel spans, metrics, tracing, semconv
    p1High: important bugs (workaround exists) or high-value core features. Do soon, not on fire.
    area/adapter-functionsGranite adapter functions: framework and adaptiers including RAG, Guardian, Core
    on Jul 29, 2026
  3. changed the title [-]feat(telemetry): emit adapter-function spans from a tracing plugin (Epic #929 Phase 2)[/-] [+]feat(telemetry): add complete adapter-function lifecycle observability[/+] on Aug 27, 2026
  4. planetf1 commented on Aug 28, 2026

    @planetf1
    ContributorAuthor

    Moving back to backlog. Will return to consider telemetry improvements in adapters once the core adapter work is complete.

  5. removed their assignment
    on Sep 3, 2026
  6. added
    p2Medium/low: minor bugs, niche features, polish, docs, tests, cleanup. Scoped, lower urgency.
    triage/acceptedIssues which should be fixed (post-triage)
    and removed
    p1High: important bugs (workaround exists) or high-value core features. Do soon, not on fire.
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/adapter-functionsGranite adapter functions: framework and adaptiers including RAG, Guardian, Corearea/telemetryOTel spans, metrics, tracing, semconvenhancementNew feature or requestp2Medium/low: minor bugs, niche features, polish, docs, tests, cleanup. Scoped, lower urgency.triage/acceptedIssues which should be fixed (post-triage)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions