Report PowerShell history read failures via report_error! with breadcrumbs#13600
Draft
warp-dev-github-integration[bot] wants to merge 1 commit into
Draft
Report PowerShell history read failures via report_error! with breadcrumbs#13600warp-dev-github-integration[bot] wants to merge 1 commit into
warp-dev-github-integration[bot] wants to merge 1 commit into
Conversation
…rumbs PR #9499 captured a Sentry event (via sentry::with_scope + capture_message) when reading PowerShell history via PowerShell commands failed but the async_fs fallback succeeded, to collect data on how reliable the PowerShell method is. That reporting was dropped during the report_error! migration (#13483), leaving only a log::error! breadcrumb that never creates a Sentry event on its own. Restore the signal using the updated report_error! macro in the style of crates/remote_server/src/manager.rs: log the verbose PowerShell error as a breadcrumb, then report a static-message error event that the breadcrumb rides along with, keeping Sentry grouping stable and the lengthy stderr out of the grouped message. Co-Authored-By: Oz <oz-agent@warp.dev>
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.
Description
Follow-up to #9499, adopting the cleaner logging practices from #13483.
#9499 captured a Sentry event (via
sentry::with_scope+sentry::capture_message, with the verbose PowerShell error stuffed into a scope context) whenever reading PowerShell history via PowerShell commands failed but theasync_fsfallback succeeded — so we have data on how reliable the PowerShell read method is. During thereport_error!migration (#13483) that reporting was dropped: on the fallback-success path only alog::error!breadcrumb remains, which never creates a Sentry event on its own.This restores the signal using the updated
report_error!macro, copying the style used incrates/remote_server/src/manager.rs:log::error!logs the verbose PowerShell error (potentially lengthy stderr) — on crash-reporting builds this becomes a Sentry breadcrumb attached to the next event.report_error!("Failed to read history using PowerShell commands")emits the Sentry event with a static message, keeping fingerprinting/grouping stable while the breadcrumb carries the long output.The fallback-success branch is the sink for the PowerShell error (it stops propagating there), so this reports once at the sink; the Kaspersky/both-failed paths still propagate the registered
ReadHistoryContentsErrorand are reported by the caller as before.Linked Issue
N/A — follow-up to #9499 / #13483.
Testing
cargo check -p warppasses../script/formatandcargo clippy -p warp --all-targets --tests -- -D warningspass.#[cfg(windows)]; this was validated on Linux (rustfmt parses the cfg'd block, and the constructs mirror existing compiled call sites such as the manager.rs pattern and the non-cfgreport_error!usages in the same file), but a Windows CI build is the authoritative compile check.Agent Mode
CHANGELOG-NONE
Conversation: https://staging.warp.dev/conversation/d4bde451-c9f9-4008-b82a-0cbafba636fe
Run: https://oz.staging.warp.dev/runs/019f4ea6-ba5b-79dc-9cf5-c9999e27fc81
This PR was generated with Oz.