captbaritone / raven-for-redux

A Raven middleware for Redux
295 stars 25 forks source link

Support for @sentry/browser #92

Closed deammer closed 6 years ago

deammer commented 6 years ago

Hi, I'm trying to set up raven-for-redux with @sentry/browser but can't find a way to set up the middleware. The init method adds a window.__SENTRY__ object but it doesn't have the necessary setDataCallback hook. Here's my setup:

import thunk from 'redux-thunk';
import { applyMiddleware, createStore, compose } from 'redux';
import { init } from '@sentry/browser';
import createRavenMiddleware from 'raven-for-redux';

// Init Sentry
init({
  dsn: process.env.SENTRY_URL,
  environment: process.env.NODE_ENV
});

// Create the store
const reduxStore = createStore(
  rootReducer,
  compose(applyMiddleware(thunk, createRavenMiddleware(window.__SENTRY__)))
);

Any ideas?

deammer commented 6 years ago

I apologize, this is a duplicate of #82.