Skip to content

Commit 7cb8ce1

Browse files
committed
Auto merge of #3277 - Turbo87:sentry-route-name, r=locks
routes/application: Add `routeName` tag to all issues This will hopefully make it easier to identify which routes have the most issues 😅
2 parents 655908e + 3e93bb4 commit 7cb8ce1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/routes/application.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@ import { action } from '@ember/object';
22
import Route from '@ember/routing/route';
33
import { inject as service } from '@ember/service';
44

5+
import * as Sentry from '@sentry/browser';
6+
57
export default class ApplicationRoute extends Route {
68
@service progress;
9+
@service router;
710
@service session;
811

912
beforeModel() {
13+
this.router.on('routeDidChange', () => {
14+
Sentry.configureScope(scope => {
15+
scope.setTag('routeName', this.router.currentRouteName);
16+
});
17+
});
18+
1019
// trigger the task, but don't wait for the result here
1120
//
1221
// we don't need a `catch()` block here because network

0 commit comments

Comments
 (0)