I am using @digikare/nestjs-prom to collect metrics in my service. I would like to expose the /metrics endpoint only on port 9090 and not on the main port.
How could I achieve this?
I am using @digikare/nestjs-prom to collect metrics in my service. I would like to expose the /metrics endpoint only on port 9090 and not on the main port.
How could I achieve this?
I decided to use a different module. That module also provides a tutorial on how to do it correctly.
Looks like this package just adds an endpoint, so if you want /metrics to be on port 9090 you'd either need to run the app on that port, or make a reverse proxy run on port 9090 and forward on /metrics to your main application.