F-013: feat(observability): tracing spans on pipeline functions#17
F-013: feat(observability): tracing spans on pipeline functions#17Sephyi wants to merge 1 commit intodevelopmentfrom
Conversation
Add `#[tracing::instrument]` to the three load-bearing stages of the commit-generation pipeline so span-aware debug output (e.g. `COMMITBEE_LOG=debug,commitbee::app=trace`) shows per-stage timing and a handful of high-signal fields: - `App::generate_commit` — provider, model - `AnalyzerService::extract_symbols` — file_count - `ContextBuilder::build` — symbols, diffs, files All spans use `skip_all` plus explicit fields so `Self`, raw file contents, and large collections are never recorded as span attributes. No function signatures or return types change; this is purely diagnostic. Closes audit entry F-013 from #3.
There was a problem hiding this comment.
Pull request overview
Adds tracing spans to key pipeline functions to improve observability and satisfy audit finding F-013.
Changes:
- Instrument
App::generate_commit()with span fields for provider/model. - Instrument
AnalyzerService::extract_symbols()with a file-count field. - Instrument
ContextBuilder::build()with fields describing symbol/diff/file counts.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/app.rs |
Adds a tracing span around the main commit-generation pipeline entrypoint. |
src/services/analyzer.rs |
Adds a tracing span for the symbol extraction step. |
src/services/context.rs |
Adds a tracing span for prompt-context construction with basic cardinality fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #[tracing::instrument( | ||
| skip_all, | ||
| fields(symbols = symbols.len(), diffs = diffs.len(), files = changes.files.len()) | ||
| )] |
There was a problem hiding this comment.
#[tracing::instrument] requires the tracing crate to be compiled with the attributes feature (or an explicit tracing-attributes setup). In the current branch Cargo.toml has tracing = "0.1" without features, so these new attributes will fail to compile with "cannot find attribute instrument in crate tracing". Please enable tracing's attributes feature (preferred) or otherwise add the required proc-macro dependency/configuration.
| #[tracing::instrument( | |
| skip_all, | |
| fields(symbols = symbols.len(), diffs = diffs.len(), files = changes.files.len()) | |
| )] |
Summary
feat(observability): tracing spans on pipeline functions.
Audit context
Closes audit entry F-013 from #3.
Verification
cargo fmt --checkcargo clippy --all-targets --all-features -- -D warningscargo test --all-targets