SkeLLLa / fastify-metrics

Prometheus metrics exporter for Fastify
https://savelife.in.ua/en/donate-en/
MIT License
96 stars 33 forks source link

[bug] Only metrics router can be exposed #63

Closed SethWen closed 1 year ago

SethWen commented 1 year ago
# deps
"fastify": "4.6.0",
"fastify-metrics": "9.2.2",
"prom-client": "14.1.0",

await must be added when register, or http metrics can not be exposed, except the metrics router. The example.js can reproduce this bug, while example.ts is ok.

SkeLLLa commented 1 year ago

Hi. Looks like example was not updated after fastify v4 upgrade, when new register logic was introduced.

Do you want to make a PR with fix?