Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ impl App {
self.generate_commit().await
}

#[tracing::instrument(
skip_all,
fields(provider = %self.config.provider, model = %self.config.model)
)]
async fn generate_commit(&mut self) -> Result<()> {
if self.cancel_token.is_cancelled() {
return Err(Error::Cancelled);
Expand Down
1 change: 1 addition & 0 deletions src/services/analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ impl AnalyzerService {

/// Extract symbols from file changes using full file content + hunk mapping.
/// Uses rayon to parse files in parallel across CPU cores.
#[tracing::instrument(skip_all, fields(file_count = changes.len()))]
pub fn extract_symbols(
&self,
changes: &[FileChange],
Expand Down
4 changes: 4 additions & 0 deletions src/services/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ const SKIP_CONTENT_FILES: &[&str] = &[
pub struct ContextBuilder;

impl ContextBuilder {
#[tracing::instrument(
skip_all,
fields(symbols = symbols.len(), diffs = diffs.len(), files = changes.files.len())
)]
Comment on lines +39 to +42
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

#[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.

Suggested change
#[tracing::instrument(
skip_all,
fields(symbols = symbols.len(), diffs = diffs.len(), files = changes.files.len())
)]

Copilot uses AI. Check for mistakes.
pub fn build(
changes: &StagedChanges,
symbols: &[CodeSymbol],
Expand Down
Loading