Skip to content

Conversation

@zavelevsky
Copy link
Collaborator

@zavelevsky zavelevsky commented Nov 12, 2025

Note

Introduces Sentry third‑party error filtering using an application key, wired into both runtime init and the Vite Sentry plugin, with new env/type definitions.

  • Sentry:
    • Add thirdPartyErrorFilterIntegration in src/init-sentry.ts to drop errors containing third‑party frames using VITE_SENTRY_APPLICATION_KEY (fallback to custom_application_key_carbon_app).
    • Pass applicationKey to the Sentry Vite plugin in vite.config.ts from VITE_SENTRY_APPLICATION_KEY (with same fallback).
  • Env/Types:
    • Add VITE_SENTRY_APPLICATION_KEY to .env.sample and ImportMetaEnv in src/vite-env.d.ts.

Written by Cursor Bugbot for commit 80eef6b. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on December 7

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 12, 2025

Deploying carbon-app-celo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 80eef6b
Status: ✅  Deploy successful!
Preview URL: https://6047f426.carbon-app-celo.pages.dev
Branch Preview URL: https://sentry-filter.carbon-app-celo.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 12, 2025

Deploying carbon-app with  Cloudflare Pages  Cloudflare Pages

Latest commit: 80eef6b
Status: ✅  Deploy successful!
Preview URL: https://726eaa4c.carbon-app-csq.pages.dev
Branch Preview URL: https://sentry-filter.carbon-app-csq.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 12, 2025

Deploying carbon-app-sei with  Cloudflare Pages  Cloudflare Pages

Latest commit: 80eef6b
Status: ✅  Deploy successful!
Preview URL: https://144d5b55.carbon-app-sei.pages.dev
Branch Preview URL: https://sentry-filter.carbon-app-sei.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 12, 2025

Deploying carbon-app-coti with  Cloudflare Pages  Cloudflare Pages

Latest commit: 80eef6b
Status: ✅  Deploy successful!
Preview URL: https://59dd26c5.carbon-app-coti.pages.dev
Branch Preview URL: https://sentry-filter.carbon-app-coti.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 12, 2025

Deploying carbon-app-blast with  Cloudflare Pages  Cloudflare Pages

Latest commit: 80eef6b
Status: ✅  Deploy successful!
Preview URL: https://29d391b9.carbon-app-blast.pages.dev
Branch Preview URL: https://sentry-filter.carbon-app-blast.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 12, 2025

Deploying carbon-app-tac with  Cloudflare Pages  Cloudflare Pages

Latest commit: 80eef6b
Status: ✅  Deploy successful!
Preview URL: https://d438c9fa.carbon-app-tac.pages.dev
Branch Preview URL: https://sentry-filter.carbon-app-tac.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 12, 2025

Deploying carbon-app-ton-tg with  Cloudflare Pages  Cloudflare Pages

Latest commit: 80eef6b
Status: ✅  Deploy successful!
Preview URL: https://89e65ccc.carbon-app-ton-tg.pages.dev
Branch Preview URL: https://sentry-filter.carbon-app-ton-tg.pages.dev

View logs

project: env.SENTRY_PROJECT,
applicationKey:
env.VITE_SENTRY_APPLICATION_KEY ||
'custom_application_key_carbon_app',
Copy link

Choose a reason for hiding this comment

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

Bug: Sentry Vite Plugin: Configuration Error Halts Error Filtering

The applicationKey parameter passed to sentryVitePlugin doesn't appear to be a valid configuration option for the Sentry Vite plugin. According to Sentry's documentation, bundler plugins use _experiments.moduleMetadata to inject metadata for third-party error filtering, not a top-level applicationKey parameter. This means the third-party error filtering configured in src/init-sentry.ts likely won't function correctly because the application key won't be properly embedded in the build output for Sentry to match against the filterKeys.

Fix in Cursor Fix in Web

Copy link
Collaborator

@GrandSchtroumpf GrandSchtroumpf left a comment

Choose a reason for hiding this comment

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

Code LGTM

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.

2 participants