redux-raven-persist-middleware

1.2.3 • Public • Published

react-redux-persist-sentry-middleware

Redux middleware for sending error reports to Sentry through raven-js.

Will automatically send an error report upon encountering a Javascript error on dispatching any action. redux-raven-middleware will pass in the error as well as extra information such as the action that caused the error and the entire Redux application state.Also, it will add the localStorage data as a breadcrumb for debugging.

RavenMiddleware(sentryDSN, sentryConfig, middlewareOptions)

Creates a Raven Middleware.

  • sentryDSN -- string representing your Sentry instance.
  • sentryConfig -- object that will be passed into Raven.config.
  • middlewareOptions -- object to customize the middleware:
  • actionTransformer -- transform the action before sending to Sentry
  • stateTransformer -- transform the state before sending to Sentry
  • logger -- log function to use instead of console.error
import {applyMiddleware, createStore} from 'redux';
import RavenMiddleware from 'redux-raven-persist-middleware';
 
 
const createStoreWithMiddleware = applyMiddleware(
  RavenMiddleware('my-sentry-dsn')
)(createStore);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.3
    1
  • 1.2.1
    0
  • 1.2.0
    0

Package Sidebar

Install

npm i redux-raven-persist-middleware

Weekly Downloads

1

Version

1.2.3

License

MIT

Last publish

Collaborators

  • rishantagarwal