Skip to content

[READY] Improve Sentry Tags#1228

Merged
ebma merged 7 commits into
stagingfrom
chore/sentry-phase-2-4
Jul 3, 2026
Merged

[READY] Improve Sentry Tags#1228
ebma merged 7 commits into
stagingfrom
chore/sentry-phase-2-4

Conversation

@Sharqiewicz

Copy link
Copy Markdown
Member

No description provided.

@netlify

netlify Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploy Preview for vortex-sandbox ready!

Name Link
🔨 Latest commit 25ce739
🔍 Latest deploy log https://app.netlify.com/projects/vortex-sandbox/deploys/6a47d161e51e4d0008ce3b7c
😎 Deploy Preview https://deploy-preview-1228--vortex-sandbox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploy Preview for vortexfi ready!

Name Link
🔨 Latest commit 25ce739
🔍 Latest deploy log https://app.netlify.com/projects/vortexfi/deploys/6a47d161beaf6500081cd0db
😎 Deploy Preview https://deploy-preview-1228--vortexfi.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Not ready to approve

There’s a confirmed PII/grouping leak in normalizePath for URLs with query strings and likely type/signature issues in helpers/sentry.ts that can break compilation or event processing.

Pull request overview

This PR improves frontend Sentry signal quality and privacy by adding business-domain tagging, better endpoint grouping for API errors, and centralized filtering/scrubbing via a beforeSend hook. It also adds targeted capture points and a widget-level error boundary to surface and report real failures more consistently.

Changes:

  • Add domain tagging support across API and signing errors (DomainError, SentryDomain), and normalize API paths for better Sentry grouping.
  • Centralize Sentry filtering/scrubbing in helpers/sentry.ts and wire it into Sentry.init (ignore/deny lists, query redaction, expected-4xx dropping).
  • Add Sentry capture at the ramp machine terminal error state and wrap the widget subtree in Sentry.ErrorBoundary.
File summaries
File Description
apps/frontend/src/services/api/api-client.ts Adds domain tagging + path normalization to improve Sentry grouping/privacy for API errors.
apps/frontend/src/pages/widget/index.tsx Wraps widget content in a Sentry error boundary with a translated retry fallback UI.
apps/frontend/src/main.tsx Configures Sentry using shared helpers (beforeSend, ignore/deny lists) and tightens trace propagation targets.
apps/frontend/src/machines/ramp.machine.ts Captures non-user-rejection ramp failures to Sentry at the machine Error state.
apps/frontend/src/machines/actors/sign.actor.ts Makes signing errors domain-tagged as wallet for Sentry.
apps/frontend/src/helpers/sentry.ts New centralized Sentry config: noise filtering, expected-4xx dropping, and URL/query redaction.
.agents/skills/sentry-vortex/SKILL.md Adds a repo skill doc describing Sentry conventions and auditing rules.

Copilot's findings

  • Files reviewed: 7/7 changed files
  • Comments generated: 3

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +41 to +46
function normalizePath(path: string): string {
return path
.replace(/\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(?=\/|$)/g, "/:id")
.replace(/\/\d+(?=\/|$)/g, "/:id")
.replace(/\/[A-Za-z0-9]{20,}(?=\/|$)/g, "/:id");
}
Comment on lines +1 to +2
import type { ErrorEvent, EventHint } from "@sentry/react";
import { type DomainError, isApiError } from "../services/api/api-client";
Comment thread apps/frontend/src/helpers/sentry.ts Outdated
Comment on lines +44 to +46
export function sentryBeforeSend(event: ErrorEvent, hint: EventHint): ErrorEvent | null {
const original = hint.originalException;

Sharqiewicz and others added 2 commits July 3, 2026 11:56
…domain tag

- Drop 409 from EXPECTED_CLIENT_STATUSES so genuine ramp money-flow conflicts ("Quote already consumed", "Ramp is not in a state that allows updates") reach Sentry; keep 429 as expected rate-limit noise.
- Strip any query string in getApiDomain before deriving the segment so inlined params can't leak into the domain tag.
@ebma ebma merged commit 6240f46 into staging Jul 3, 2026
7 checks passed
@ebma ebma deleted the chore/sentry-phase-2-4 branch July 3, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants