How to use the @sentry/integrations.Transaction function in @sentry/integrations

To help you get started, we’ve selected a few @sentry/integrations examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github felixbrucker / foxy-proxy / app.js View on Github external
if (program.live) {
  store.setUseLiveDashboard(true);
  dashboard = new Dashboard();
  dashboard.start();
}

const config = new Config();

Sentry.init({
  dsn: 'https://2d4461f632f64ecc99e24c7d88dc1cea@sentry.io/1402474',
  release: `foxy-proxy@${version}`,
  attachStacktrace: true,
  integrations: [
    new Integrations.Dedupe(),
    new Integrations.ExtraErrorData(),
    new Integrations.Transaction(),
  ],
});

process.on('unhandledRejection', (err) => {
  eventBus.publish('log/error', `Error: ${err.message}`);
});
process.on('uncaughtException', (err) => {
  eventBus.publish('log/error', `Error: ${err.message}`);
});

store.setLogLevel(config.logLevel || 'info');
store.setLogDir(config.logDir);
if (config.logToFile) {
  logger.enableFileLogging();
}
store.setIsInstalledGlobally(!!config.config.isInstalledGlobally);
github integrations / jira / lib / error-handler.js View on Github external
const Sentry = require('@sentry/node')
const sentryStream = require('bunyan-sentry-stream')
const Integrations = require('@sentry/integrations')

Sentry.init({
  dsn: process.env.SENTRY_DSN,
  environment: process.env.NODE_ENV,
  release: process.env.HEROKU_SLUG_COMMIT,
  integrations: [
    new Integrations.Transaction(),
    new Integrations.Debug(),
    new Integrations.ExtraErrorData()
  ]
})

module.exports = app => {
  app.log.debug('Errors will be reported to Sentry')
  app.log.target.addStream(sentryStream(Sentry, 'error'))

  const router = app.route('/')
  router.get('/boom', req => {
    const err = new Error('Boom')
    if (req.query.async) {
      app.log.error(err)
      return Promise.reject(err)
    }