Skip to content

refactor(acp): add #[tracing::instrument] to permission check and HTTP transport handlers#4851

Merged
bug-ops merged 1 commit into
mainfrom
tracing-instrumentation
Jun 5, 2026
Merged

refactor(acp): add #[tracing::instrument] to permission check and HTTP transport handlers#4851
bug-ops merged 1 commit into
mainfrom
tracing-instrumentation

Conversation

@bug-ops

@bug-ops bug-ops commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • AcpPermissionGate::check_permission (permission.rs) now emits span acp.permission.check with session_id field, making IDE round-trip latency visible in local Chrome JSON traces.
  • Five HTTP transport handlers in transport/http.rs now emit acp.http.health, acp.http.post, acp.http.get, acp.http.list_sessions, acp.http.session_messages spans, completing HTTP-path trace coverage (the stdio/JSON-RPC path in agent/mod.rs already had 14 handler spans).
  • Issue refactor(context): 3 pub async fns in summarization.rs missing tracing instrumentation #4842 (3 fns in summarization.rs) was confirmed as a false positive by CI-975: all three target functions were already instrumented by prior PRs — this PR resolves the issue as "already done".

Changes

File Change
crates/zeph-acp/src/permission.rs +1 line: #[tracing::instrument] on check_permission
crates/zeph-acp/src/transport/http.rs +5 lines: #[tracing::instrument] on 5 HTTP handlers
CHANGELOG.md Entry in [Unreleased] ### Changed

Test plan

  • cargo +nightly fmt --check — clean
  • cargo clippy -p zeph-acp -p zeph-context -- -D warnings — 0 warnings
  • RUSTFLAGS="-D warnings" cargo check -p zeph-acp -p zeph-context --all-targets --locked — clean
  • cargo nextest run --workspace --lib --bins — 9510 passed, 0 failed, 21 skipped (integration)

Closes #4837, #4806, #4842.

@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes refactor Code refactoring without functional changes size/S Small PR (11-50 lines) labels Jun 5, 2026
…P handlers

Add tracing spans to the two uninstrumented pub async paths in zeph-acp:

- AcpPermissionGate::check_permission (permission.rs): span
  acp.permission.check with session_id field, making IDE round-trip
  latency visible in local Chrome JSON traces.

- Five HTTP transport handlers (transport/http.rs): spans acp.http.health,
  acp.http.post, acp.http.get, acp.http.list_sessions, and
  acp.http.session_messages (with session_id field), completing HTTP-path
  coverage consistent with the already-instrumented stdio/JSON-RPC path.

Issue #4842 (summarization.rs) was confirmed as a false positive: all
three target functions were already instrumented by prior PRs.

Closes #4837, #4806, #4842.
@bug-ops bug-ops enabled auto-merge (squash) June 5, 2026 18:58
@bug-ops bug-ops force-pushed the tracing-instrumentation branch from 634c7e1 to 3eff95f Compare June 5, 2026 18:58
@bug-ops bug-ops merged commit 0589c50 into main Jun 5, 2026
32 checks passed
@bug-ops bug-ops deleted the tracing-instrumentation branch June 5, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation refactor Code refactoring without functional changes rust Rust code changes size/S Small PR (11-50 lines)

Projects

None yet

1 participant