Skip to content

fix(llm): make tracing instrument spans unconditional in zeph-llm backends and router#5345

Merged
bug-ops merged 1 commit into
mainfrom
5336-llm-tracing-gates
Jun 13, 2026
Merged

fix(llm): make tracing instrument spans unconditional in zeph-llm backends and router#5345
bug-ops merged 1 commit into
mainfrom
5336-llm-tracing-gates

Conversation

@bug-ops

@bug-ops bug-ops commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

Note: cocoon/client.rs was intentionally left unchanged — its 4 async fns are already instrumented via inline .instrument(info_span!("llm.cocoon.*")) calls, which is equivalent to unconditional #[tracing::instrument].

Test plan

  • cargo +nightly fmt --check — clean
  • cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warnings — clean
  • cargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins — 11482 passed
  • RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler" — clean
  • grep 'feature = "profiling"' crates/zeph-llm/src/ (excl. candle) → empty
  • All #[tracing::instrument] attributes verified to include skip_all — no sensitive args exposed in tracing output

…kends and router

Remove ~42 `#[cfg_attr(feature = "profiling", tracing::instrument(...))]` gates
across claude, openai, ollama, compatible, gemini, and router (chat, select,
provider_impl). Follows the same pattern applied to candle_provider in #5335.

Add unconditional `#[tracing::instrument]` to 10 previously uninstrumented
pub async fns in any.rs, extractor.rs, classifier/llm.rs, provider_dyn.rs, and
model_cache.rs. cocoon/client.rs already uses inline .instrument() — unchanged.

Closes #5336, closes #5337.
@bug-ops bug-ops added llm zeph-llm crate (Ollama, Claude) P3 Research — medium-high complexity tech-debt Technical debt labels Jun 13, 2026
@github-actions github-actions Bot added rust Rust code changes bug Something isn't working size/L Large PR (201-500 lines) labels Jun 13, 2026
@bug-ops bug-ops enabled auto-merge (squash) June 13, 2026 22:04
@bug-ops bug-ops merged commit bbe441b into main Jun 13, 2026
36 checks passed
@bug-ops bug-ops deleted the 5336-llm-tracing-gates branch June 13, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working llm zeph-llm crate (Ollama, Claude) P3 Research — medium-high complexity rust Rust code changes size/L Large PR (201-500 lines) tech-debt Technical debt

Projects

None yet

1 participant