Skip to content
Snippets Groups Projects
Unverified Commit c683baa4 authored by Paul Melnikow's avatar Paul Melnikow Committed by GitHub
Browse files

Disable more default Sentry integrations (#3770)

This one is spewing a bunch of recent http calls into each error log.

I get he benefit of these plugins though I'm curious what resources they might be using. And in this case, don't want the requests to end up e.g. in a GitHub issue.
parent a120e5df
No related branches found
No related tags found
No related merge requests found
...@@ -9,10 +9,22 @@ require('dotenv').config() ...@@ -9,10 +9,22 @@ require('dotenv').config()
// Set up Sentry reporting as early in the process as possible. // Set up Sentry reporting as early in the process as possible.
const config = require('config').util.toObject() const config = require('config').util.toObject()
const Sentry = require('@sentry/node') const Sentry = require('@sentry/node')
const disabledIntegrations = ['Console', 'Http']
Sentry.init({ Sentry.init({
dsn: process.env.SENTRY_DSN || config.private.sentry_dsn, dsn: process.env.SENTRY_DSN || config.private.sentry_dsn,
integrations: integrations => integrations: integrations => {
integrations.filter(integration => integration.name !== 'Console'), const filtered = integrations.filter(
integration => !disabledIntegrations.includes(integration.name)
)
if (filtered.length != integrations.length - disabledIntegrations.length) {
throw Error(
`An error occurred while filtering integrations. The following inetgrations were found: ${integrations.map(
({ name }) => name
)}`
)
}
return filtered
},
}) })
if (+process.argv[2]) { if (+process.argv[2]) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment