Skip to content

Inconsistent outcome label vocabulary across exported metrics #485

Description

@dereklarmstrong

Several metric families label call outcomes with 'ok'/'error' while others use 'success'/'retryable_error'/'other_error' for the same underlying concept:

  • 'switchyard_llm_call_duration_ms' / 'switchyard_llm_calls_total' use 'outcome="ok" | "error"' (crates/libsy-llm-client/src/metrics.rs)
  • 'switchyard_client_responses_total' uses 'outcome="success" | "retryable_error" | "other_error"' (via 'http_outcome_label', crates/switchyard-server/src/metrics.rs)

The docs (metrics_reference.md) document both vocabularies as-is. As written, this is a trap for dashboard authors: copying an 'outcome="success"' filter onto an LLM-call-metrics panel silently yields no data (and vice versa), because the filter matches nothing.

Suggestion: either unify to one vocabulary across all families, or at minimum add a prominent note to 'metrics_reference.md' that the two vocabularies are not interchangeable, with correct per-metric filter examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions