File tree Expand file tree Collapse file tree 4 files changed +8
-77
lines changed
Expand file tree Collapse file tree 4 files changed +8
-77
lines changed Original file line number Diff line number Diff line change 3939 "fastify-cli" : " 7.4.1" ,
4040 "fastify-metrics" : " ^12.1.0" ,
4141 "fastify-plugin" : " ^5.1.0" ,
42- "ipaddr.js" : " ^2.3.0" ,
4342 "jsonwebtoken" : " ^9.0.2" ,
4443 "jwks-rsa" : " ^3.2.0" ,
4544 "openid-client" : " ^6.8.1" ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
1111 RawRequestDefaultExpression ,
1212 RawServerDefault ,
1313} from "fastify" ;
14+ import fastifyMetrics from "fastify-metrics" ;
1415import * as path from "path" ;
1516import { fileURLToPath } from "url" ;
1617
@@ -68,7 +69,7 @@ if (options.lokiHost) {
6869 target : "pino-loki" ,
6970 options : {
7071 batching : true ,
71- interval : 5 , // Every 5 seconds, default.
72+ interval : 5 ,
7273 host : options . lokiHost ,
7374 labels : { application : packageJson . name } ,
7475 } ,
@@ -100,6 +101,12 @@ const app: FastifyPluginAsync<AppOptions> = async (
100101 origin : "*" ,
101102 } ) ;
102103
104+ // Register Metrics
105+ await fastify . register ( fastifyMetrics . default , {
106+ endpoint : "/metrics" ,
107+ defaultMetrics : { enabled : true } ,
108+ } ) ;
109+
103110 // Register Swagger & Swagger UI & Scalar
104111 await fastify . register ( import ( "@fastify/swagger" ) , {
105112 openapi : {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2500,13 +2500,6 @@ __metadata:
25002500 languageName : node
25012501 linkType : hard
25022502
2503- " ipaddr.js@npm:^2.3.0 " :
2504- version : 2.3.0
2505- resolution : " ipaddr.js@npm:2.3.0"
2506- checksum : 10c0/084bab99e2f6875d7a62adc3325e1c64b038a12c9521e35fb967b5e263a8b3afb1b8884dd77c276092331f5d63298b767491e10997ef147c62da01b143780bbd
2507- languageName : node
2508- linkType : hard
2509-
25102503" is-arrayish@npm:^0.2.1 " :
25112504 version : 0.2.1
25122505 resolution : " is-arrayish@npm:0.2.1"
@@ -4273,7 +4266,6 @@ __metadata:
42734266 fastify-tsconfig : " npm:^3.0.0"
42744267 globals : " npm:^16.5.0"
42754268 husky : " npm:^9.1.7"
4276- ipaddr.js : " npm:^2.3.0"
42774269 jsonwebtoken : " npm:^9.0.2"
42784270 jwks-rsa : " npm:^3.2.0"
42794271 openid-client : " npm:^6.8.1"
You can’t perform that action at this time.
0 commit comments