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.
This commit is contained in:
Paul Melnikow
2019-07-24 20:39:07 -05:00
committed by GitHub
parent a120e5df9b
commit c683baa4fb

View File

@@ -9,10 +9,22 @@ require('dotenv').config()
// Set up Sentry reporting as early in the process as possible.
const config = require('config').util.toObject()
const Sentry = require('@sentry/node')
const disabledIntegrations = ['Console', 'Http']
Sentry.init({
dsn: process.env.SENTRY_DSN || config.private.sentry_dsn,
integrations: integrations =>
integrations.filter(integration => integration.name !== 'Console'),
integrations: integrations => {
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]) {