artmizu / nuxt-prometheus

Prometheus metrics for NodeJS and a set of custom metrics for Nuxt applications
59 stars 11 forks source link

Measure /api routes #48

Open sisou opened 1 week ago

sisou commented 1 week ago

Thanks for this module, I was almost going to write my own before I found this :pray:

However, I noticed this does not track /api routes, only frontend page renders?

I'm currently using my Nuxt3 deployment primarily as an API only, no frontend yet.

How can I track those routes, or how can I add them to this module?

artmizu commented 1 week ago

@sisou Hi, thank you for the nice improvement idea

I think we can simply add the nitro/plugin with an appropriate hooks:

image

I'll investigate how to do it properly next week. stay tuned :)