Skip to content

observability(router): add tracing instrumentation to cascade router#1843

Merged
bug-ops merged 1 commit intomainfrom
observability-router-add-traci
Mar 15, 2026
Merged

observability(router): add tracing instrumentation to cascade router#1843
bug-ops merged 1 commit intomainfrom
observability-router-add-traci

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 15, 2026

Closes #1825

Summary

  • Log provider selection at the start of each cascade attempt (provider, attempt N of M, classifier mode, quality threshold)
  • Log judge scoring success (score, threshold, pass/fail decision) — previously only failures were logged
  • Log best_seen updates in both cascade_chat and cascade_chat_stream
  • Log final exhaustion fallthrough in cascade_chat when all providers are tried
  • Log last-provider selection in cascade_chat_stream (streaming, no classification)
  • Align cascade_chat_stream quality verdict log fields with cascade_chat (add threshold and reason)
  • Align cascade_chat_stream escalation log fields with cascade_chat (add threshold and escalations_remaining)

Changes

Single file modified: crates/zeph-llm/src/router/mod.rs — 56 lines added (tracing calls only, no logic changes).

Test plan

  • cargo +nightly fmt --check — clean
  • cargo clippy --workspace --features full -- -D warnings — 0 warnings
  • cargo nextest run --workspace --features full --lib --bins — 5821 passed, 0 failed

@github-actions github-actions bot added documentation Improvements or additions to documentation llm zeph-llm crate (Ollama, Claude) rust Rust code changes size/M Medium PR (51-200 lines) labels Mar 15, 2026
…1825)

- Log provider selection at the start of each cascade attempt (provider name,
  attempt N of M, classifier mode, quality threshold)
- Log judge scoring success with score, threshold, and pass/fail decision
- Log best_seen updates in both cascade_chat and cascade_chat_stream
- Log final exhaustion path in cascade_chat when all providers are tried
- Log last-provider selection in cascade_chat_stream (streaming, no classification)
- Align cascade_chat_stream quality verdict log fields with cascade_chat
  (add threshold and reason)
- Align cascade_chat_stream escalation log fields with cascade_chat
  (add threshold and escalations_remaining)
@bug-ops bug-ops force-pushed the observability-router-add-traci branch from 241b45b to f202205 Compare March 15, 2026 16:21
@bug-ops bug-ops enabled auto-merge (squash) March 15, 2026 16:21
@bug-ops bug-ops merged commit 1cb416a into main Mar 15, 2026
15 checks passed
@bug-ops bug-ops deleted the observability-router-add-traci branch March 15, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation llm zeph-llm crate (Ollama, Claude) rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

observability(router): add tracing instrumentation to cascade router

1 participant