Skip to content

Commit

Permalink
Merge pull request #14006 from mozilla/FXA-5726-remove-sentry-tracing…
Browse files Browse the repository at this point in the history
…-references

Fxa 5726 remove sentry tracing references
  • Loading branch information
millsoper authored Aug 30, 2022
2 parents bd715fa + 20736c4 commit 2ade9a5
Show file tree
Hide file tree
Showing 43 changed files with 0 additions and 213 deletions.
6 changes: 0 additions & 6 deletions packages/browserid-verifier/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ function loadConf() {
format: 'Number',
env: 'SENTRY_SAMPLE_RATE',
},
tracesSampleRate: {
doc: 'Rate at which sentry traces are captured.',
default: 0.0,
format: 'Number',
env: 'SENTRY_TRACES_SAMPLE_RATE',
},
serverName: {
doc: 'Name used by sentry to identify the server.',
default: 'browserid-verifier',
Expand Down
6 changes: 0 additions & 6 deletions packages/browserid-verifier/lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

const Sentry = require('@sentry/node');
const Tracing = require('@sentry/tracing');

const express = require('express'),
bodyParser = require('body-parser'),
Expand Down Expand Up @@ -47,13 +46,8 @@ if (sentryConfig.dsn) {
event = tagFxaName(event, opts.serverName);
return event;
},
integrations: [
new Sentry.Integrations.Http({ tracing: true }),
new Tracing.Integrations.Express({ app }),
],
});
app.use(Sentry.Handlers.requestHandler());
app.use(Sentry.Handlers.tracingHandler());
}

var verifier = new CCVerifier({
Expand Down
1 change: 0 additions & 1 deletion packages/browserid-verifier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"dependencies": {
"@sentry/integrations": "6.19.7",
"@sentry/node": "6.19.7",
"@sentry/tracing": "6.19.7",
"async": "3.2.4",
"body-parser": "^1.19.1",
"browserid-local-verify": "0.5.2",
Expand Down
1 change: 0 additions & 1 deletion packages/fxa-admin-panel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"dependencies": {
"@apollo/client": "^3.4.5",
"@sentry/node": "^7.3.1",
"@sentry/tracing": "^7.3.1",
"body-parser": "^1.19.1",
"convict": "^6.2.3",
"convict-format-with-moment": "^6.2.0",
Expand Down
6 changes: 0 additions & 6 deletions packages/fxa-admin-panel/server/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ const conf = convict({
format: 'Number',
env: 'SENTRY_SAMPLE_RATE',
},
tracesSampleRate: {
doc: 'Rate at which sentry traces are captured.',
default: 0.0,
format: 'Number',
env: 'SENTRY_TRACES_SAMPLE_RATE',
},
serverName: {
doc: 'Name used by sentry to identify the server.',
default: 'fxa-admin-panel',
Expand Down
6 changes: 0 additions & 6 deletions packages/fxa-admin-panel/server/lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

// TO DO: CORS, other security-related tasks (#4312)
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';

import express, { Request, Response } from 'express';
import bodyParser from 'body-parser';
Expand Down Expand Up @@ -61,13 +60,8 @@ if (sentryConfig.dsn) {
event = tagFxaName(event, opts.serverName);
return event;
},
integrations: [
new Sentry.Integrations.Http({ tracing: true }),
new Tracing.Integrations.Express({ app }),
],
});
app.use(Sentry.Handlers.requestHandler());
app.use(Sentry.Handlers.tracingHandler());
}

app.use(
Expand Down
6 changes: 0 additions & 6 deletions packages/fxa-admin-server/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@ const conf = convict({
format: 'Number',
env: 'SENTRY_SAMPLE_RATE',
},
tracesSampleRate: {
doc: 'Rate at which sentry traces are captured.',
default: 0.0,
format: 'Number',
env: 'SENTRY_TRACES_SAMPLE_RATE',
},
serverName: {
doc: 'Name used by sentry to identify the server.',
default: 'fxa-admin-server',
Expand Down
6 changes: 0 additions & 6 deletions packages/fxa-auth-server/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1646,12 +1646,6 @@ const conf = convict({
format: 'Number',
env: 'SENTRY_SAMPLE_RATE',
},
tracesSampleRate: {
doc: 'Rate at which sentry traces are captured.',
default: 0.0,
format: 'Number',
env: 'SENTRY_TRACES_SAMPLE_RATE',
},
serverName: {
doc: 'Name used by sentry to identify the server.',
default: 'fxa-auth-server',
Expand Down
2 changes: 0 additions & 2 deletions packages/fxa-auth-server/lib/sentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
const config = require('../config').getProperties();
const Hoek = require('@hapi/hoek');
const Sentry = require('@sentry/node');
require('@sentry/tracing');
const { ExtraErrorData } = require('@sentry/integrations');
const verror = require('verror');
const { ERRNO } = require('./error');
Expand Down Expand Up @@ -194,7 +193,6 @@ async function configureSentry(server, config, processName = 'key_server') {
integrations: [
new Sentry.Integrations.LinkedErrors({ key: 'jse_cause' }),
new ExtraErrorData({ depth: 5 }),
new Sentry.Integrations.Http({ tracing: true }),
],
// https://docs.sentry.io/platforms/node/configuration/options/#max-value-length
maxValueLength: 500,
Expand Down
6 changes: 0 additions & 6 deletions packages/fxa-content-server/app/scripts/lib/sentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import * as Sentry from '@sentry/browser';
import { BrowserTracing } from '@sentry/tracing';

import {
buildSentryConfig,
Expand Down Expand Up @@ -140,11 +139,6 @@ function SentryMetrics(config) {
event = beforeSend(event);
return event;
},
integrations: [
new BrowserTracing({
tracingOrigins: opts.tracingOrigins,
}),
],
});
} catch (e) {
this._logger.error(e);
Expand Down
1 change: 0 additions & 1 deletion packages/fxa-content-server/app/tests/spec/lib/sentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ describe('lib/sentry', function () {
dsn,
env: 'test',
sampleRate: 1.0,
tracesSampleRate: 1.0,
clientName: 'fxa-content-server-test',
},
});
Expand Down
1 change: 0 additions & 1 deletion packages/fxa-content-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"@sentry/browser": "^6.19.7",
"@sentry/integrations": "^6.19.1",
"@sentry/node": "^6.19.1",
"@sentry/tracing": "^6.19.1",
"asmcrypto.js": "^0.22.0",
"autoprefixer": "^10.4.7",
"babel-loader": "^8.2.2",
Expand Down
1 change: 0 additions & 1 deletion packages/fxa-content-server/server/lib/beta-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ 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'),
},
Expand Down
6 changes: 0 additions & 6 deletions packages/fxa-content-server/server/lib/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,12 +639,6 @@ const conf = (module.exports = convict({
env: 'SENTRY_SAMPLE_RATE',
format: Number,
},
tracesSampleRate: {
default: 0.0,
doc: 'Sentry config for client side errors. If not set, then no errors reported.',
env: 'SENTRY_TRACES_SAMPLE_RATE',
format: Number,
},
},
sourceMapType: {
default: 'source-map',
Expand Down
2 changes: 0 additions & 2 deletions packages/fxa-content-server/server/lib/routes/get-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ 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');
Expand Down Expand Up @@ -83,7 +82,6 @@ module.exports = function (config) {
dsn: SENTRY_CLIENT_DSN,
env: SENTRY_CLIENT_ENV,
sampleRate: SENTRY_SAMPLE_RATE,
tracesSampleRate: SENTRY_TRACES_SAMPLE_RATE,
clientName: SENTRY_CLIENT_NAME,
},
staticResourceUrl: STATIC_RESOURCE_URL,
Expand Down
3 changes: 0 additions & 3 deletions packages/fxa-content-server/server/lib/sentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const {
const logger = require('./logging/log')('sentry');

const Sentry = require('@sentry/node');
require('@sentry/tracing');

function removeQuery(url) {
if (!url) {
Expand Down Expand Up @@ -60,7 +59,6 @@ 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'),
},
},
Expand All @@ -76,7 +74,6 @@ if (config.get('sentry.dsn')) {
},
integrations: [
new Sentry.Integrations.LinkedErrors({ key: 'jse_cause' }),
new Sentry.Integrations.Http({ tracing: true }),
],
});
}
Expand Down
6 changes: 0 additions & 6 deletions packages/fxa-customs-server/lib/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,6 @@ module.exports = function (fs, path, url, convict) {
format: 'Number',
env: 'SENTRY_SAMPLE_RATE',
},
tracesSampleRate: {
doc: 'Rate at which sentry traces are captured.',
default: 0.0,
format: 'Number',
env: 'SENTRY_TRACES_SAMPLE_RATE',
},
serverName: {
doc: 'Name used by sentry to identify the server.',
default: 'fxa-customs-server',
Expand Down
2 changes: 0 additions & 2 deletions packages/fxa-customs-server/lib/sentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

const Hoek = require('@hapi/hoek');
const Sentry = require('@sentry/node');
require('@sentry/tracing');
const {
buildSentryConfig,
tagCriticalEvent,
Expand All @@ -28,7 +27,6 @@ async function configureSentry(server, config, log) {
...opts,
integrations: [
new Sentry.Integrations.LinkedErrors({ key: 'jse_cause' }),
new Sentry.Integrations.Http({ tracing: true }),
],
beforeSend(event, _hint) {
event = tagCriticalEvent(event);
Expand Down
6 changes: 0 additions & 6 deletions packages/fxa-event-broker/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,6 @@ const conf = convict({
env: 'SENTRY_SAMPLE_RATE',
format: 'Number',
},
tracesSampleRate: {
default: 0.0,
doc: 'Rate at which traces are sampled.',
env: 'SENTRY_TRACES_SAMPLE_RATE',
format: 'Number',
},
serverName: {
doc: 'Name used by sentry to identify the server.',
default: 'fxa-event-broker',
Expand Down
6 changes: 0 additions & 6 deletions packages/fxa-graphql-api/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,6 @@ const conf = convict({
env: 'SENTRY_SAMPLE_RATE',
format: 'Number',
},
tracesSampleRate: {
default: 0.0,
doc: 'Rate at which traces are sampled.',
env: 'SENTRY_TRACES_SAMPLE_RATE',
format: 'Number',
},
serverName: {
doc: 'Name used by sentry to identify the server.',
default: 'fxa-graphql-api',
Expand Down
1 change: 0 additions & 1 deletion packages/fxa-payments-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
"dependencies": {
"@sentry/browser": "^6.19.7",
"@sentry/node": "^6.19.1",
"@sentry/tracing": "^6.19.1",
"@stripe/react-stripe-js": "^1.10.0",
"@stripe/stripe-js": "^1.31.0",
"accept-language-parser": "^1.5.0",
Expand Down
6 changes: 0 additions & 6 deletions packages/fxa-payments-server/server/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,6 @@ const conf = convict({
env: 'SENTRY_SAMPLE_RATE',
format: 'Number',
},
tracesSampleRate: {
default: 0.0,
doc: 'Rate at which traces are sampled.',
env: 'SENTRY_TRACES_SAMPLE_RATE',
format: 'Number',
},
serverName: {
doc: 'Name used by sentry to identify the server.',
default: 'fxa-payments-broker',
Expand Down
7 changes: 0 additions & 7 deletions packages/fxa-payments-server/server/lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ module.exports = () => {
const helmet = require('helmet');
const noCache = require('nocache');
const Sentry = require('@sentry/node');
const Tracing = require('@sentry/tracing');
const serveStatic = require('serve-static');

const bodyParser = require('body-parser');
Expand Down Expand Up @@ -75,7 +74,6 @@ module.exports = () => {
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'),
clientName: config.get('sentry.clientName'),
},
Expand Down Expand Up @@ -131,13 +129,8 @@ module.exports = () => {
event = tagFxaName(event, opts.serverName);
return event;
},
integrations: [
new Sentry.Integrations.Http({ tracing: true }),
new Tracing.Integrations.Express({ app }),
],
});
app.use(Sentry.Handlers.requestHandler());
app.use(Sentry.Handlers.tracingHandler());
}

const hstsEnabled = config.get('hstsEnabled');
Expand Down
2 changes: 0 additions & 2 deletions packages/fxa-payments-server/src/lib/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ const mockConfig = {
env: 'test',
sampleRate: 1.0,
serverName: 'fxa-payments-server',
tracesSampleRate: 0.0,
},
version: '1.0.0',
};
Expand Down Expand Up @@ -138,7 +137,6 @@ const expectedMergedConfig = {
env: 'test',
sampleRate: 1.0,
serverName: 'fxa-payments-server',
tracesSampleRate: 0.0,
},
servers: {
auth: {
Expand Down
2 changes: 0 additions & 2 deletions packages/fxa-payments-server/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export interface Config {
dsn: string;
env: string;
sampleRate: number;
tracesSampleRate: number;
clientName?: string;
serverName?: string;
};
Expand Down Expand Up @@ -63,7 +62,6 @@ export function defaultConfig(): Config {
dsn: '',
env: 'test',
sampleRate: 1.0,
tracesSampleRate: 0.0,
serverName: 'fxa-payments-server',
clientName: 'fxa-payments-client',
},
Expand Down
6 changes: 0 additions & 6 deletions packages/fxa-payments-server/src/lib/sentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import Logger from './logger';
import * as Sentry from '@sentry/browser';
import { BrowserTracing } from '@sentry/tracing';

import {
tagFxaName,
Expand Down Expand Up @@ -145,11 +144,6 @@ SentryMetrics.prototype = {
event = tagFxaName(event, opts.clientName);
return event;
},
integrations: [
new BrowserTracing({
tracingOrigins: opts.tracingOrigins,
}),
],
});
} catch (e) {
this._logger.error(e);
Expand Down
2 changes: 0 additions & 2 deletions packages/fxa-payments-server/src/lib/sentry.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ describe('lib/sentry', function () {
env,
serverName,
sampleRate: 1.0,
tracesSampleRate: 0.0,
},
});
} catch (e) {
Expand All @@ -51,7 +50,6 @@ describe('lib/sentry', function () {
env,
serverName,
sampleRate: 1.0,
tracesSampleRate: 0.0,
},
});

Expand Down
Loading

0 comments on commit 2ade9a5

Please sign in to comment.