fix(llm): make tracing instrument spans unconditional in zeph-llm backends and router#5345
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#[cfg_attr(feature = "profiling", tracing::instrument(...))]gates acrossclaude/mod.rs,openai/mod.rs,ollama.rs,compatible.rs,gemini/mod.rs,router/chat.rs,router/select.rs, androuter/provider_impl.rs(closes fix(tracing): remove profiling feature gate from zeph-llm backend and router instrument spans #5336)#[tracing::instrument]to 10 previously untracedpub async fns inany.rs,extractor.rs,classifier/llm.rs,provider_dyn.rs, andmodel_cache.rs(closes fix(tracing): add instrument spans to uninstrumented pub async fns in zeph-llm (any, cocoon, extractor, classifier, model_cache) #5337)candle_provider/in PR fix(llm): remove profiling feature gate from candle tracing spans #5335Note:
cocoon/client.rswas 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— cleancargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warnings— cleancargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins— 11482 passedRUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"— cleangrep 'feature = "profiling"' crates/zeph-llm/src/(excl. candle) → empty#[tracing::instrument]attributes verified to includeskip_all— no sensitive args exposed in tracing output