We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d973d7 commit 5167f11Copy full SHA for 5167f11
packages/server/src/middleware/log.js
@@ -92,10 +92,15 @@ export function logMiddleware(app, options) {
92
}
93
94
if (_compasSentryExport) {
95
- if (_compasSentryExport?.metrics?.increment) {
+ if (_compasSentryExport.metrics?.increment) {
96
+ let compasRouteName = ctx.event.name;
97
+ if (!compasRouteName.startsWith("router.")) {
98
+ compasRouteName = "<unmatched>";
99
+ }
100
+
101
_compasSentryExport.metrics.increment("compas.route.name", 1, {
102
tags: {
- compasRouteName: ctx.event.name ?? "<unmatched>",
103
+ compasRouteName,
104
},
105
unit: "none",
106
});
0 commit comments