chore: Enable parameterized route profiling
This commit is contained in:
12
app/components/ProfiledRoute.js
Normal file
12
app/components/ProfiledRoute.js
Normal file
@ -0,0 +1,12 @@
|
||||
// @flow
|
||||
import * as Sentry from "@sentry/react";
|
||||
import { Route } from "react-router-dom";
|
||||
import env from "env";
|
||||
|
||||
let Component = Route;
|
||||
|
||||
if (env.SENTRY_DSN) {
|
||||
Component = Sentry.withSentryRouting(Route);
|
||||
}
|
||||
|
||||
export default Component;
|
Reference in New Issue
Block a user