-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs for custom metrics #10
Comments
Yes, it's possible. Plugin expose Actually there are few docs in https://github.com/SkeLLLa/fastify-metrics/blob/master/docs/interfaces/_fastify_.fastifyinstance.md#metrics, but it requires to go deeper to discover what's in there. |
Custom metrics seem to just work when you create them using the FastifyInstance client. const socketGauge = new fastify.metrics.client.Gauge({
name: 'notification_sockets_open',
help: 'Number of notification websockets open',
collect() {
this.set(sockets.length)
}
}) |
comment deleted. false alarm. |
Hi, thanks for your amazing repo!
I would like to gather some custom metrics but I didn't find some tests that describe this kind of feature. Is it possible to add a custom gauge to prom-client. If yes, how?
I can send you a PR if needed.
The text was updated successfully, but these errors were encountered: