refactor(acp): add #[tracing::instrument] to permission check and HTTP transport handlers#4851
Merged
Conversation
…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.
634c7e1 to
3eff95f
Compare
This was
linked to
issues
Jun 5, 2026
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
AcpPermissionGate::check_permission(permission.rs) now emits spanacp.permission.checkwithsession_idfield, making IDE round-trip latency visible in local Chrome JSON traces.transport/http.rsnow emitacp.http.health,acp.http.post,acp.http.get,acp.http.list_sessions,acp.http.session_messagesspans, completing HTTP-path trace coverage (the stdio/JSON-RPC path inagent/mod.rsalready had 14 handler spans).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
crates/zeph-acp/src/permission.rs+1line:#[tracing::instrument]oncheck_permissioncrates/zeph-acp/src/transport/http.rs+5lines:#[tracing::instrument]on 5 HTTP handlersCHANGELOG.md[Unreleased] ### ChangedTest plan
cargo +nightly fmt --check— cleancargo clippy -p zeph-acp -p zeph-context -- -D warnings— 0 warningsRUSTFLAGS="-D warnings" cargo check -p zeph-acp -p zeph-context --all-targets --locked— cleancargo nextest run --workspace --lib --bins— 9510 passed, 0 failed, 21 skipped (integration)Closes #4837, #4806, #4842.