Conversation
Wires sentry-tower per-request hubs, adds release (git SHA) and environment tags, and tags tenant_id/key_id on every event so Sentry output is actionable rather than anonymous. - sentry::init now sets release (GIT_SHA build-arg), environment (ENVIRONMENT env var), and send_default_pii=false - NewSentryLayer + SentryHttpLayer with transactions on top-level router - HTTP auth middleware tags tenant_id/key_id/transport on per-request hub - MCP initialize() does the same, plus #[tracing::instrument] on the 7 MCP tool methods - AppError::into_response emits tracing::error!/warn! so error paths reach Sentry through sentry-tracing without panicking - Dockerfile + CI workflow pass GIT_SHA build-arg from current commit Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Aligns with the recommended config from docs.sentry.io/platforms/rust/logs — ERROR fires both an Event and a structured Log; INFO/WARN/DEBUG produce a breadcrumb plus a Log; TRACE is dropped. Also limits noise from tower_http/hyper/h2/reqwest/mongodb modules via EnvFilter. Drops the separate sentry-tracing and sentry-tower crates in favor of the bundled feature-gated integrations on the main sentry crate. Co-Authored-By: Claude Opus 4.7 (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.
Summary
sentry-towerper-request hubs (NewSentryLayer+SentryHttpLayer) so every HTTP and MCP request gets its own scope with method, URL, matched path, and a transaction.release(git SHA viaGIT_SHAbuild-arg) andenvironment(ENVIRONMENTenv var) so events group by deploy and filter by env.send_default_pii: false.tenant_id,key_id, andtransport(http/mcp) on the per-request hub from both auth middlewares — events are no longer anonymous.AppError::into_responsenow firestracing::error!(5xx) /tracing::warn!(4xx) so non-panic error paths reach Sentry viasentry-tracingwithout changing service code.#[tracing::instrument]on all 7 MCP tool methods (stacks cleanly on#[tool]); HTTP handlers were already instrumented.GIT_SHA=$(git rev-parse --short=12 HEAD)so prod builds get a real release tag instead ofunknown.Fly secrets already pushed:
rift-api:SENTRY_DSN,ENVIRONMENT=productionrift-api-sandbox:SENTRY_DSN,ENVIRONMENT=stagingTest plan
cargo fmt -- --checkcargo clippy --all-targets -- -D warningscargo test(145 passed)release,environment=production,tenant_id,key_id, and a matched-path transactiontransport=mcpand thetoolfield set🤖 Generated with Claude Code