Skip to content
Merged
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
3 changes: 2 additions & 1 deletion .planning/STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ See: .planning/PROJECT.md (updated 2026-05-09)
Phase: Milestone v1.0 complete
Plan: —
Status: Awaiting next milestone
Last activity: 2026-05-10 — Completed quick task 260510-hu6: Scale staging parser workers to 2
Last activity: 2026-06-15 — Completed quick task 260615-snt: Wire errors-only Sentry

## Performance Metrics

Expand Down Expand Up @@ -258,6 +258,7 @@ Resolved: The 05-03 stable Rust coverage blocker was resolved by the custom
| 260509-p4m | Retired post-v1 migration compare, benchmark, and worker-smoke tooling; renamed quality gates crate | 2026-05-09 | committed | Verified | [260509-p4m-post-v1-cleanup-migration-harness-benchm](./quick/260509-p4m-post-v1-cleanup-migration-harness-benchm/) |
| 260509-rff | Fixed KS victory detection from OCAP raw `mission_message` events | 2026-05-09 | committed | Verified | [260509-rff-ocap-raw-events-mission-message-top-leve](./quick/260509-rff-ocap-raw-events-mission-message-top-leve/) |
| 260510-hu6 | Scale staging parser workers to 2 | 2026-05-10 | d0a2b33 | Verified | [260510-hu6-scale-staging-parser-workers-to-2](./quick/260510-hu6-scale-staging-parser-workers-to-2/) |
| 260615-snt | Wire errors-only Sentry/GlitchTip into the parser binary | 2026-06-15 | (this PR) | Reviewed (APPROVE) | [260615-snt-sentry-errors-only-wire](./quick/260615-snt-sentry-errors-only-wire/) |

## Deferred Items

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
quick_id: 260615-snt
slug: sentry-errors-only-wire
status: complete
date: 2026-06-15
---

# Quick Task 260615-snt: Wire errors-only Sentry

Wire an errors-only Sentry/GlitchTip SDK into the `replay-parser-2` binary per
`plans/replay-parser-2/briefs/sentry-wire.md`.

## Task

1. Add the `sentry` crate to `parser-cli` with a minimal, errors-only feature set
(`backtrace`, `contexts`, `panic`, `reqwest`, `rustls`; `default-features = false`) —
no `tracing`/`profiling` features, no performance tracing.
- files: `crates/parser-cli/Cargo.toml`
- verify: `cargo build`
- done: dependency present, builds clean.

2. Initialize the Sentry guard at the very top of `fn main()` in the single binary
(`parser-cli/src/main.rs`), bound to `let _sentry` so it lives for the whole process and
flushes on drop. DSN from `SENTRY_DSN` (empty → disabled no-op client). Set
`environment = "staging"` and `release = sentry::release_name!()`; never set
`traces_sample_rate`.
- files: `crates/parser-cli/src/main.rs`
- verify: `cargo build && cargo clippy --all-targets -- -D warnings && cargo fmt --check && cargo test`
- done: guard bound before `run()`, outlives the worker's tokio runtime; gate green.

## must_haves

- truths: errors-only (no traces_sample_rate); guard held for process lifetime; empty DSN is a no-op.
- artifacts: `crates/parser-cli/Cargo.toml`, `crates/parser-cli/src/main.rs`.
- key_links: `plans/replay-parser-2/briefs/sentry-wire.md`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
quick_id: 260615-snt
slug: sentry-errors-only-wire
status: complete
date: 2026-06-15
---

# Quick Task 260615-snt — Summary

Wired errors-only Sentry/GlitchTip reporting into the `replay-parser-2` binary.

## Changes

- `crates/parser-cli/Cargo.toml` — added `sentry = "0.48.2"` with `default-features = false`
and `features = ["backtrace", "contexts", "panic", "reqwest", "rustls"]`. `rustls` matches the
worker's existing TLS stack; `panic` kept, `tracing`/`profiling` omitted.
- `crates/parser-cli/src/main.rs` — `let _sentry = sentry::init(...)` as the first statement of
`main()`, bound so the guard outlives the worker's tokio runtime and flushes on drop. DSN from
`SENTRY_DSN` (empty → disabled no-op). `environment = "staging"`, `release = release_name!()`,
no `traces_sample_rate` (errors only).
- `Cargo.lock` — dependency resolution.

## Gate

- cargo build: ✅
- cargo test: ✅ (all suites pass)
- cargo clippy --all-targets -- -D warnings: ✅
- cargo fmt --check: ✅

## Review

`solidstats-parser-rust-code-review`: APPROVE. Contract N/A (binary-only change); determinism and
lint gates clean. No critical/high findings; two informational notes (handled CLI errors not
reported to Sentry by design; guard correctly outlives the runtime).

## Notes / assumptions

- The brief references `src/main.rs`; the workspace's single binary entrypoint is
`crates/parser-cli/src/main.rs` (the worker runs via the `Worker` subcommand inside it), so the
guard there covers both CLI and worker process lifetimes.
- Forced-error GlitchTip smoke test from the brief is operator-run with a live `SENTRY_DSN`; not
performed here.
- Explicit `sentry::capture_error` on handled `CliError` paths is out of scope (panics are
auto-captured); can be added later if operators want handled errors in GlitchTip.
Loading