feat(cli): wire errors-only Sentry/GlitchTip reporting - #1
Merged
Conversation
Initialize a Sentry client guard at the top of main() bound to a live binding so it lives for the whole process and flushes events on drop. DSN comes from SENTRY_DSN (empty/unset yields a disabled no-op client). Set environment=staging and release=release_name!(); never set traces_sample_rate, so reporting stays errors-only with no performance tracing or profiling. Panics are captured by the panic integration. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Wires an errors-only Sentry SDK (reporting to GlitchTip) into the
replay-parser-2binary perplans/replay-parser-2/briefs/sentry-wire.md.What
sentrytoparser-cliwithdefault-features = falseand a minimal errors-only feature set:backtrace,contexts,panic,reqwest,rustls. Notracing/profilingfeatures.main(), bound tolet _sentryso it lives for the whole process (owns the panic hook, flushes pending events on drop). It outlives the worker's tokio runtime built inside theWorkersubcommand.SENTRY_DSNenv var; empty/unset → disabled no-op client (the crate handles this).environment = "staging",release = sentry::release_name!().traces_sample_rateis never set → stays 0.0, errors only, no performance tracing.Gate
cargo build✅cargo test✅cargo clippy --all-targets -- -D warnings✅cargo fmt --check✅Review
solidstats-parser-rust-code-review: APPROVE. Contract N/A (binary-only change); determinism + lint gates clean. No critical/high findings.Notes
src/main.rs; the workspace's single binary entrypoint iscrates/parser-cli/src/main.rs(the worker runs via theWorkersubcommand inside it), so the guard there covers both CLI and worker process lifetimes.SENTRY_DSN; not performed here.sentry::capture_erroron handledCliErrorpaths is intentionally out of scope — panics are auto-captured.🤖 Generated with Claude Code