## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.
YES
## What kind of change does this PR introduce?
Chore
## What is the current behavior?
100% of traces are being sent to Sentry, which alone would blew through
all of our quota leaving no spans available for other projects. For
April we are already rate limited.
## What is the new behavior?
Change `tracesSampleRate` to more reasonable value (0.02).
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Optimized performance monitoring sampling configuration to reduce
application overhead while maintaining essential error tracking and
diagnostics.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sentry was flooded with un-actionable events: browser extension errors,
network blips, React hydration
noise from DOM-manipulating extensions, and CriticalError issues that
were impossible to route because
they grouped by message string rather than type. This made it hard to
spot real regressions.
## Changes:
- Improved client-side Sentry signal quality in
apps/studio/instrumentation-client.ts by replacing
custom third-party stack filtering with
Sentry.thirdPartyErrorFilterIntegration, plus stricter
allowUrls filtering for Supabase/app frames.
- Added build-time Sentry bundle annotation in
apps/studio/next.config.js via
unstable_sentryWebpackPluginOptions.applicationKey = 'supabase-studio'
to support reliable third-party
frame filtering.
- Expanded and reorganized ignoreErrors rules across client/server/edge
Sentry configs to suppress known
non-actionable noise (Next.js navigation internals, network/transient
chunk failures, extension/DOM-
manipulation noise, hydration-noise patterns).
- Refactored critical error reporting in
apps/studio/lib/error-reporting.ts from captureMessage to
captureException with scoped tags (critical=true, context=<action>) and
synthetic CriticalError
exceptions for better alerting/grouping.
- Updated tests in apps/studio/lib/error-reporting.test.ts to match the
new Sentry API usage (withScope
+ captureException) and assert on exception objects/tags behavior.
- 100% sampling (codeSampleRate = 1) for normal/useful errors.
- 1% sampling (codeSampleRate = 0.01) only for explicitly noisy classes:
- Failed to construct 'URL': Invalid URL
- Session error detected
- chunk-load failures (ChunkLoadError, Loading chunk ... failed, Loading
CSS chunk ... failed)
- Sent events are tagged with codeSampleRate so you can filter/segment
in Sentry dashboards.
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
- Added tracesSampleRate: 0.1 to all three Sentry configuration files
(client, server, edge)
- Captures 10% of transactions for performance monitoring
- Previously: No performance data was being collected (missing this
config)
- Now: Sentry will track route performance, error rates per route, and
transaction data
Why this was needed:
- Without tracesSampleRate, Sentry's Performance tab was empty
- Error rates per route were not visible
- No transaction/route-level metrics were being collected
- The SDK was only capturing errors without context about which routes
they occurred on
Impact:
- Enables route-based error tracking (see which endpoints/pages have
errors)
- Provides performance metrics per route (page load times, API response
times)
- Allows monitoring of Web Vitals and navigation performance
- 10% sample rate balances visibility with Sentry quota usage
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Fixed date display formatting in logs to ensure accurate timestamp
representation.
* **Chores**
* Enabled performance monitoring to collect transaction data and track
application behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
* Bump sentry to v8.
* Fix all obsolete APIs.
* Fix the sentry configs.
* Add pages for testing sentry.
* Add missing imports to sentry.config file.
* Add base path to the api path.
* Remove extra files.
* ref: Remove stale Sentry event filters
* ref: Enable non-error objects to be captured by Sentry
* ref: Capture Sentry events originating from our own code only
* Move all studio files from /studio to /apps/studio.
* Move studio specific prettier ignores.
* Fix the ui references from studio.
* Fix the css imports.
* Fix all package.json issues.
* Fix the prettier setup for the studio app.
* Add .turbo folder to prettierignore.
* Fix the github workflows.