All Projects → auru → redux-sentry

auru / redux-sentry

Licence: MIT license
Middleware that logs all your store and actions on exception to Sentry with raven-js

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to redux-sentry

sentry-testkit
A Sentry plugin to allow Sentry report interception and further inspection of the data being sent
Stars: ✭ 78 (+500%)
Mutual labels:  sentry, raven
zend-sentry
A Zend Framework 3 module that lets you log to the Sentry.io service.
Stars: ✭ 34 (+161.54%)
Mutual labels:  sentry, raven
raven-python-lambda
Sentry/Raven SDK Integration For AWS Lambda (python) and Serverless
Stars: ✭ 48 (+269.23%)
Mutual labels:  sentry, raven
sanic-sentry
Sentry integration to sanic web server
Stars: ✭ 31 (+138.46%)
Mutual labels:  sentry, raven
Sentry Javascript
Official Sentry SDKs for JavaScript. We're hiring https://grnh.se/ca81c1701us
Stars: ✭ 6,012 (+46146.15%)
Mutual labels:  sentry, raven
send-test-info
Attach unit test information to exceptions sent by Raven to Sentry
Stars: ✭ 17 (+30.77%)
Mutual labels:  sentry, raven
good-sentry
Sentry broadcasting for good process monitor
Stars: ✭ 15 (+15.38%)
Mutual labels:  sentry, raven
aiohttp-sentry
An aiohttp server middleware for reporting failed requests to Sentry
Stars: ✭ 35 (+169.23%)
Mutual labels:  sentry, raven
micro-sentry
Tiny Sentry client with idiomatic wrapper for Angular
Stars: ✭ 100 (+669.23%)
Mutual labels:  sentry
rhythm
Time-based job scheduler for Apache Mesos
Stars: ✭ 30 (+130.77%)
Mutual labels:  sentry
fullstack-nextjs-ecommerce
Fullstack Next.js E-Commerce made with NextAuth + Prisma, Docker + TypeScript + React Query + Stripe + Tailwind Sentry and much more 🛒
Stars: ✭ 524 (+3930.77%)
Mutual labels:  sentry
drivers-linux-firmware
MOVED: https://gitlab.com/q3aql/drivers-linux-firmware
Stars: ✭ 28 (+115.38%)
Mutual labels:  raven
iAts pro
Antenna tracking system build on ESP32 module
Stars: ✭ 44 (+238.46%)
Mutual labels:  raven
AspNetCore.Identity.RavenDB
RavenDB Storage Provider for ASP.NET Core Identity
Stars: ✭ 16 (+23.08%)
Mutual labels:  raven
sentry-ruby-api
Ruby wrapper for getsentry/Sentry REST API
Stars: ✭ 19 (+46.15%)
Mutual labels:  sentry
logging
mod: zap logging in golang
Stars: ✭ 44 (+238.46%)
Mutual labels:  sentry
sentry-msteams
Microsoft Teams Integration for Sentry
Stars: ✭ 27 (+107.69%)
Mutual labels:  sentry
thvu-blog
My digital home on the internet.
Stars: ✭ 51 (+292.31%)
Mutual labels:  sentry
sentry-typo3
TYPO3 Sentry integration
Stars: ✭ 17 (+30.77%)
Mutual labels:  sentry
app
Buggregator is a beautiful, lightweight debug server build on Laravel that helps you catch your smpt, sentry, var-dump, monolog, ray outputs. It runs without installation on multiple platforms.
Stars: ✭ 259 (+1892.31%)
Mutual labels:  sentry

Redux sentry

Includes middleware that logs all your store and actions on exception to Sentry with raven-js

Table of Contents

Installation

Install redux-sentry package from npm:

npm i --save redux-sentry

Usage

redux-sentry can be used in cases:

  • Raven has been initialized before
/* store.js */

import { SENTRY_SETTINGS, VERSION } from './constants';

import { createStore, applyMiddleware, compose, combineReducers } from 'redux';

import createSentryMiddleware from 'redux-sentry';

const sentryMiddleware = createSentryMiddleware();

// Add sentry middleware to your list of middlewares
const middlewares = [ sentryMiddleware ];

// Enhance your store by using sentry's enhancer
const toEnhance = [
    applyMiddleware(...middlewares)
];

// Put it all together
const enhancer = compose(...toEnhance);
const reducers = combineReducers({
    // combined reducers
});

const initialState = {}

const store = createStore(reducers, initialState, enhancer);

export default store;
  • Raven hasn't been initialized. It should be configured by params
/* store.js */

import { SENTRY_SETTINGS, VERSION } from './constants';

import { createStore, applyMiddleware, compose, combineReducers } from 'redux';

import createSentryMiddleware from 'redux-sentry';

const sentryMiddleware = createSentryMiddleware({
    dsn: SENTRY_SETTINGS.DSN,
    configuration: {
        release: VERSION,
        collectWindowErrors: true
    },
    username: parse(document.cookie).login
});

// Add sentry middleware to your list of middlewares
const middlewares = [ sentryMiddleware ];

// Enhance your store by using sentry's enhancer
const toEnhance = [
    applyMiddleware(...middlewares)
];

// Put it all together
const enhancer = compose(...toEnhance);
const reducers = combineReducers({
    // combined reducers
});

const initialState = {}

const store = createStore(reducers, initialState, enhancer);

export default store;

API

createSentryMiddleware({ dsn, configuration = {}, username }, transform = {})

import createSentryMiddleware from 'redux-sentry';

Middleware that logs all your store and actions on exception to Sentry with raven-js

dsn {String}

DSNData Source Name. Unique name generated for the project by you Sentry.

configuration {Object} optional

Raven configuration object. Full list of keys can be found here.

username {String} optional

Default: Guest username used for setting user context.

Raven.setUserContext({ username });

transform {Object} optional

Default:

{
    actionTransform: a => a,
    stateTransform: a => a.toJS()
}

Functions used for cooking action object, store for Raven's extra field. stateTransform uses toJS from immutable.js to convert state back to raw JavaScript object.

Contributing

  • Provide conventional commit messages by using npm run commit instead of git commit.
  • Core contributors: use GitHub's Rebase and merge as a default way of merging PRs.

License

MIT © AuRu

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].