diff --git a/packages/browserid-verifier/lib/config.js b/packages/browserid-verifier/lib/config.js index c72e2ce40a..3971c484e6 100644 --- a/packages/browserid-verifier/lib/config.js +++ b/packages/browserid-verifier/lib/config.js @@ -110,7 +110,7 @@ function loadConf() { }, tracesSampleRate: { doc: 'Rate at which sentry traces are captured', - default: 1.0, + default: 0, format: 'Number', env: 'SENTRY_TRACES_SAMPLE_RATE', }, diff --git a/packages/fxa-admin-panel/server/config/index.ts b/packages/fxa-admin-panel/server/config/index.ts index b47afdf085..8a1c154186 100644 --- a/packages/fxa-admin-panel/server/config/index.ts +++ b/packages/fxa-admin-panel/server/config/index.ts @@ -91,7 +91,7 @@ const conf = convict({ }, tracesSampleRate: { doc: 'Rate at which sentry traces are captured', - default: 1.0, + default: 0, format: 'Number', env: 'SENTRY_TRACES_SAMPLE_RATE', }, diff --git a/packages/fxa-admin-server/src/config/index.ts b/packages/fxa-admin-server/src/config/index.ts index 907eb88d4e..4975ebf7e5 100644 --- a/packages/fxa-admin-server/src/config/index.ts +++ b/packages/fxa-admin-server/src/config/index.ts @@ -122,7 +122,7 @@ const conf = convict({ }, tracesSampleRate: { doc: 'Rate at which sentry traces are captured', - default: 1.0, + default: 0, format: 'Number', env: 'SENTRY_TRACES_SAMPLE_RATE', }, diff --git a/packages/fxa-auth-server/config/index.ts b/packages/fxa-auth-server/config/index.ts index b13e01cd87..261abcb004 100644 --- a/packages/fxa-auth-server/config/index.ts +++ b/packages/fxa-auth-server/config/index.ts @@ -1655,7 +1655,7 @@ const convictConf = convict({ }, tracesSampleRate: { doc: 'Rate at which sentry traces are captured', - default: 1.0, + default: 0, format: 'Number', env: 'SENTRY_TRACES_SAMPLE_RATE', }, diff --git a/packages/fxa-content-server/server/lib/beta-settings.js b/packages/fxa-content-server/server/lib/beta-settings.js index 1a91b974fe..de3a81ca4b 100644 --- a/packages/fxa-content-server/server/lib/beta-settings.js +++ b/packages/fxa-content-server/server/lib/beta-settings.js @@ -38,6 +38,7 @@ const settingsConfig = { dsn: config.get('sentry.dsn'), env: config.get('sentry.env'), sampleRate: config.get('sentry.sampleRate'), + tracesSampleRate: config.get('sentry.tracesSampleRate'), clientName: config.get('sentry.clientName'), serverName: config.get('sentry.serverName'), }, diff --git a/packages/fxa-content-server/server/lib/configuration.js b/packages/fxa-content-server/server/lib/configuration.js index 77f8abd361..2d331f907a 100644 --- a/packages/fxa-content-server/server/lib/configuration.js +++ b/packages/fxa-content-server/server/lib/configuration.js @@ -778,7 +778,7 @@ const conf = (module.exports = convict({ }, tracesSampleRate: { doc: 'Rate at which sentry traces are captured', - default: 1.0, + default: 0, format: 'Number', env: 'SENTRY_TRACES_SAMPLE_RATE', }, diff --git a/packages/fxa-content-server/server/lib/routes/get-index.js b/packages/fxa-content-server/server/lib/routes/get-index.js index 71e4de64d3..334508cedc 100644 --- a/packages/fxa-content-server/server/lib/routes/get-index.js +++ b/packages/fxa-content-server/server/lib/routes/get-index.js @@ -34,6 +34,7 @@ module.exports = function (config) { const SENTRY_CLIENT_DSN = config.get('sentry.dsn'); const SENTRY_CLIENT_ENV = config.get('sentry.env'); const SENTRY_SAMPLE_RATE = config.get('sentry.sampleRate'); + const SENTRY_TRACES_SAMPLE_RATE = config.get('sentry.tracesSampleRate'); const SENTRY_CLIENT_NAME = config.get('sentry.clientName'); const OAUTH_SERVER_URL = config.get('oauth_url'); const PAIRING_CHANNEL_URI = config.get('pairing.server_base_uri'); @@ -100,6 +101,7 @@ module.exports = function (config) { env: SENTRY_CLIENT_ENV, sampleRate: SENTRY_SAMPLE_RATE, clientName: SENTRY_CLIENT_NAME, + tracesSampleRate: SENTRY_TRACES_SAMPLE_RATE, }, staticResourceUrl: STATIC_RESOURCE_URL, subscriptions: SUBSCRIPTIONS, diff --git a/packages/fxa-content-server/server/lib/sentry.js b/packages/fxa-content-server/server/lib/sentry.js index 2c29e879be..a68a53498e 100644 --- a/packages/fxa-content-server/server/lib/sentry.js +++ b/packages/fxa-content-server/server/lib/sentry.js @@ -59,6 +59,7 @@ if (config.get('sentry.dsn')) { dsn: config.get('sentry.dsn'), env: config.get('sentry.env'), sampleRate: config.get('sentry.sampleRate'), + tracesSampleRate: config.get('sentry.tracesSampleRate'), serverName: config.get('sentry.serverName'), }, }, diff --git a/packages/fxa-customs-server/lib/config/config.js b/packages/fxa-customs-server/lib/config/config.js index 193d4d3e58..9218f67c39 100644 --- a/packages/fxa-customs-server/lib/config/config.js +++ b/packages/fxa-customs-server/lib/config/config.js @@ -330,7 +330,7 @@ module.exports = function (fs, path, url, convict) { }, tracesSampleRate: { doc: 'Rate at which sentry traces are captured', - default: 1.0, + default: 0, format: 'Number', env: 'SENTRY_TRACES_SAMPLE_RATE', }, diff --git a/packages/fxa-event-broker/src/config.ts b/packages/fxa-event-broker/src/config.ts index c66c9630d3..df12c3b474 100644 --- a/packages/fxa-event-broker/src/config.ts +++ b/packages/fxa-event-broker/src/config.ts @@ -218,7 +218,7 @@ const conf = convict({ }, tracesSampleRate: { doc: 'Rate at which sentry traces are captured', - default: 1.0, + default: 0, format: 'Number', env: 'SENTRY_TRACES_SAMPLE_RATE', }, diff --git a/packages/fxa-graphql-api/src/config.ts b/packages/fxa-graphql-api/src/config.ts index 28e809ff5e..f5231ae86d 100644 --- a/packages/fxa-graphql-api/src/config.ts +++ b/packages/fxa-graphql-api/src/config.ts @@ -260,7 +260,7 @@ const conf = convict({ }, tracesSampleRate: { doc: 'Rate at which sentry traces are captured', - default: 1.0, + default: 0, format: 'Number', env: 'SENTRY_TRACES_SAMPLE_RATE', }, diff --git a/packages/fxa-payments-server/server/config/index.js b/packages/fxa-payments-server/server/config/index.js index 8121c636de..fa3c73aca7 100644 --- a/packages/fxa-payments-server/server/config/index.js +++ b/packages/fxa-payments-server/server/config/index.js @@ -297,7 +297,7 @@ const conf = convict({ }, tracesSampleRate: { doc: 'Rate at which sentry traces are captured', - default: 1.0, + default: 0, format: 'Number', env: 'SENTRY_TRACES_SAMPLE_RATE', }, diff --git a/packages/fxa-payments-server/src/lib/config.test.ts b/packages/fxa-payments-server/src/lib/config.test.ts index 9896df953c..af2a72be33 100644 --- a/packages/fxa-payments-server/src/lib/config.test.ts +++ b/packages/fxa-payments-server/src/lib/config.test.ts @@ -142,6 +142,7 @@ const expectedMergedConfig = { dsn: 'https://foo.sentry.io/bar', env: 'test', sampleRate: 1.0, + tracesSampleRate: 0, serverName: 'fxa-payments-server', }, servers: { diff --git a/packages/fxa-payments-server/src/lib/config.ts b/packages/fxa-payments-server/src/lib/config.ts index cd82d98383..d869c22dbe 100644 --- a/packages/fxa-payments-server/src/lib/config.ts +++ b/packages/fxa-payments-server/src/lib/config.ts @@ -15,13 +15,12 @@ export interface Config { termsOfService: string; }; newsletterId: string; - productRedirectURLs: { - [productId: string]: string; - }; + productRedirectURLs: { [productId: string]: string }; sentry: { dsn: string; env: string; sampleRate: number; + tracesSampleRate?: number; clientName?: string; serverName?: string; }; @@ -74,6 +73,7 @@ export function defaultConfig(): Config { dsn: '', env: 'local', sampleRate: 1.0, + tracesSampleRate: 0, serverName: 'fxa-payments-server', clientName: 'fxa-payments-client', }, diff --git a/packages/fxa-profile-server/lib/config.js b/packages/fxa-profile-server/lib/config.js index f95df10281..52f48e22bd 100644 --- a/packages/fxa-profile-server/lib/config.js +++ b/packages/fxa-profile-server/lib/config.js @@ -341,7 +341,7 @@ const conf = convict({ }, tracesSampleRate: { doc: 'Rate at which sentry traces are captured', - default: 1.0, + default: 0, format: 'Number', env: 'SENTRY_TRACES_SAMPLE_RATE', }, diff --git a/packages/fxa-shared/sentry/config-builder.ts b/packages/fxa-shared/sentry/config-builder.ts index 9f809b0d8c..d2685d7dee 100644 --- a/packages/fxa-shared/sentry/config-builder.ts +++ b/packages/fxa-shared/sentry/config-builder.ts @@ -35,7 +35,7 @@ export function buildSentryConfig(config: SentryConfigOpts, log: ILogger) { clientName: config.sentry?.clientName, serverName: config.sentry?.serverName, fxaName: config.sentry?.clientName || config.sentry?.serverName, - tracesSampleRate: config.sentry?.tracesSampleRate || 1.0, + tracesSampleRate: config.sentry?.tracesSampleRate, }; return opts;