How we are using Sentry for mobile apps

Sentry redux middleware

const sentryMiddleware: Middleware<State, Action> = ({ getState }) => next => action => {
const { type, ...rest } = action;
Sentry.addBreadcrumb({
message: `Action: ${type}`,
category: 'action',
data: rest,
});

const { fcmToken } = getState().notifications;
fcmToken && Sentry.setTag('fcm_token', fcmToken);

return next(action);
};
Sentry breadcrumbs created via redux middleware

Custom tags

Custom Sentry Tag search

--

--

--

I'm react-native and iOS developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Compare Two Images for Similarity in JavaScript

Make a free crypto-loan liquidation alert to your mobile number

Why You Shouldn’t Use React in 2022. Here’s What To Do Instead

Welcome to the Front End

How to get a specific table by index in a Word DOCX document in Node.JS

The eval() function

Animated SVGs In React Native

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Petr Lzicar

Petr Lzicar

I'm react-native and iOS developer

More from Medium

How I Upgraded Expo 41 -> 44

Creating pagination in react-native

React native pagination in FlatList

Use Codepush for implementing efficient branching strategy for React Native

Why is React Native a good choice for Startups?