jaredleechn / dva-sentry

dva middleware, action and effect tracing, error reporting, together with https://sentry.io or self hosting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dva-sentry

NPM version

tracing action and effect, upload when an error occurs

import createSentry from 'dva-sentry';

const { user: { login, name, workid, email }, env } = window.context;
const app = dva();

app.use(createSentry({
  onReducerError,
  onEffectError,
  dsn,
  config: {
    environment: env,
    shouldSendCallback: data => data.environment !== 'local'
      && data.environment !== 'unittest',
  },
  context: {
    user: {
      login, name, workid, email,
    },
  },
}));

About

dva middleware, action and effect tracing, error reporting, together with https://sentry.io or self hosting


Languages

Language:TypeScript 100.0%