-
Notifications
You must be signed in to change notification settings - Fork 3
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
Single endpoint for all prometheus metrics #278
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the code looks good as far as I can tell, I cannot get the /metrics
endpiont to work - I get a 302
to login. I actually went back to a branch before you made your bullq change and the /metrics
endpoint didn't work then either. I had to go all the way back to 4dafb28 - and then it finally worked! Something changed between now and then - I can't see what off hand 🤔
However, researching what we did back then, I found the watchdog-config
directory! This has all the files we just recreated in watchdog. We should pick one winner (watchdog or UMT) and remove the watchdog config files from the loser.
I was involved with this earlier PR - sorry I didn't remember about these files already existing!
Oh that's weird it isn't working... The first guess I have is that have an outdated build artifact in your dist folder. Can we follow these steps to test?
I'm seeing a prometheus endpoint with both fastify and bullmq metrics when I run this test. Hope that works.
Oh wow! I didn't see that until now. That's too bad they also aren't on watchdog. I'd personally prefer to move them to the watchdog repro probably so we can track changes and deploy them for https://watchdog.app.medicmobile.org. Does that make sense to you? |
Ah - sweet - thanks Kenn! Nuking the and yeah - go ahead and nuke the watchdog files here in favor of watchdog repo. Maybe replace the readme with a big "see watchdog repo" and a link? |
I finished testing in the other watchdog ticket and this new set up works great - nicely done! OK to merge. |
The fastify-metrics library doesn't play particularly nicely for extensibility. I attempted a few vectors to merge these two endpoints:
promClient
object and add the bullmq metrics as custom counters within fastify-metricsIn the end, I liked the code for 1 the best. Let me know if you'd like to see some of the other approaches!
#273