feat(index): add tracing spans to zeph-index hot-path async fns#4393
Merged
Conversation
Instrument all async methods in CodeStore and CodeIndexer that await
external resources (Qdrant, SQLite, file I/O, embeddings):
store.rs: upsert_chunk, upsert_chunks_batch, search, existing_hashes,
remove_file_chunks, indexed_files
indexer.rs: index_project, index_batch, index_file, reindex_file,
ensure_collection_for_provider, walk_project_files,
cleanup_removed_files
All spans use skip_all with name = "index.store.*" / "index.indexer.*"
convention. Key fields (file_path, chunk_count, root) recorded via
tracing::field::display where applicable.
Closes #4388, #4391
08af62d to
8d84763
Compare
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
#[tracing::instrument]to 13 async methods acrossCodeStore(store.rs) andCodeIndexer(indexer.rs) inzeph-indexindex.store.*/index.indexer.*convention; all useskip_allfile_path,chunk_count,rootviatracing::field::displayMotivation
The CI trace analysis loop requires every
async fnawaiting an external resource to be wrapped in a span. Without spans, indexing latency (embedding, Qdrant upsert, SQLite dedup) is invisible in traces, making regressions impossible to attribute.Changes
crates/zeph-index/src/store.rs(6 methods):upsert_chunk,upsert_chunks_batch,search,existing_hashes,remove_file_chunks,indexed_filescrates/zeph-index/src/indexer.rs(7 methods):index_project,index_batch,index_file,reindex_file,ensure_collection_for_provider,walk_project_files,cleanup_removed_filesTest plan
cargo +nightly fmt --check— cleancargo clippy -p zeph-index --all-targets -- -D warnings— zero warningscargo nextest run -p zeph-index --lib— 107 passed, 0 failedRUSTFLAGS="-D warnings" cargo check -p zeph-index --lib— cleanCloses #4388, #4391