mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 05:39:11 +03:00
- 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 -->
26 lines
1.1 KiB
TypeScript
26 lines
1.1 KiB
TypeScript
// This file configures the initialization of Sentry on the server.
|
|
// The config you add here will be used whenever the server handles a request.
|
|
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
|
|
|
import * as Sentry from '@sentry/nextjs'
|
|
|
|
Sentry.init({
|
|
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
|
...(process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT && {
|
|
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT,
|
|
}),
|
|
// Setting this option to true will print useful information to the console while you're setting up Sentry.
|
|
debug: false,
|
|
|
|
// Enable performance monitoring
|
|
tracesSampleRate: 0.1, // Capture 10% of transactions for performance monitoring
|
|
ignoreErrors: [
|
|
// Used exclusively in Monaco Editor.
|
|
'ResizeObserver',
|
|
// [Joshen] We currently use stripe-js for customers to save their credit card data
|
|
// I'm unable to reproduce this error on local, staging nor prod across chrome, safari or firefox
|
|
// Based on https://github.com/stripe/stripe-js/issues/26, it seems like this error is safe to ignore,
|
|
'Failed to load Stripe.js',
|
|
],
|
|
})
|