Skip to content

F-013: feat(observability): tracing spans on pipeline functions#17

Merged
Sephyi merged 1 commit intodevelopmentfrom
audit/f-013-instrument-pipeline-spans
Apr 30, 2026
Merged

F-013: feat(observability): tracing spans on pipeline functions#17
Sephyi merged 1 commit intodevelopmentfrom
audit/f-013-instrument-pipeline-spans

Conversation

@Sephyi
Copy link
Copy Markdown
Owner

@Sephyi Sephyi commented Apr 22, 2026

Summary

feat(observability): tracing spans on pipeline functions.

Audit context

Closes audit entry F-013 from #3.

Verification

  • cargo fmt --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --all-targets

Note: one pre-existing test porcelain_exits_within_timeout_with_no_staged_changes is a known macOS cold-start flake that reproduces on unmodified development — unrelated to this change.

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.
Copilot AI review requested due to automatic review settings April 22, 2026 19:50
@Sephyi Sephyi added the audit Codebase audit cleanup (issue #3) label Apr 22, 2026
@Sephyi Sephyi self-assigned this Apr 22, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/services/context.rs
@Sephyi Sephyi merged commit 7aeebff into development Apr 30, 2026
11 of 13 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 30, 2026
@Sephyi Sephyi deleted the audit/f-013-instrument-pipeline-spans branch April 30, 2026 17:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

audit Codebase audit cleanup (issue #3)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants