Skip to content

Commit c300886

Browse files
committed
fix: convert status_code to string for metrics recording
1 parent 14f7010 commit c300886

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

backend/src/plugins/prometheus.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ const prometheusPlugin: FastifyPluginAsync = async (fastify) => {
6565
httpRequestsTotal.inc({
6666
method: request.method,
6767
route,
68-
status_code: reply.statusCode
68+
status_code: String(reply.statusCode)
6969
});
7070

7171
httpRequestDuration.observe(
7272
{
7373
method: request.method,
7474
route,
75-
status_code: reply.statusCode
75+
status_code: String(reply.statusCode)
7676
},
7777
duration
7878
);

0 commit comments

Comments
 (0)