-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathsentry.config.ts
More file actions
32 lines (27 loc) · 1.28 KB
/
sentry.config.ts
File metadata and controls
32 lines (27 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import * as Sentry from '@sentry/gatsby';
Sentry.init({
dsn: process.env.GATSBY_SENTRY_DSN,
environment: process.env.GATSBY_SENTRY_ENVIRONMENT,
sendDefaultPii: true,
integrations: [Sentry.browserTracingIntegration(), Sentry.replayIntegration()],
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 0.01,
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
// These are backends we control because we need to be able to control (or influence) the CORS
// headers at the remote server or things will break. It is also important to stick to using
// regular expressions here, as string values are treated as simple substring matches which can
// result in false positives and breakages in the browser, ie: `changelog.ably.com` would match
// `ably.com` and result in a CORS issue for our users.
tracePropagationTargets: [
/^https:\/\/ably\.com\//,
/^https:\/\/ably-dev\.com\//,
/^http:\/\/localhost(:\d+)?\//,
/^https?:\/\/ably\.test\//,
],
});