Skip to content

Commit b2b8ee1

Browse files
committed
fix(metrics): fixup the path when not available
1 parent 58bc45a commit b2b8ee1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/telemetry/requestLogger.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ function finishLog<SLocals extends AnyServiceLocals = ServiceLocals<Configuratio
6363
dur,
6464
};
6565

66-
const path = req.route ? req.route.path : null;
66+
const path = req.route ? { path: req.route.path } : undefined;
6767
histogram.record(dur, {
6868
status_code: endLog.s,
6969
method: endLog.m,
70-
path,
70+
...path,
7171
service: app.locals.name,
7272
});
7373

0 commit comments

Comments
 (0)