jochen-schweizer / express-prom-bundle

express middleware with standard prometheus metrics in one bundle
MIT License
303 stars 67 forks source link

Allows for customizing promRegistry when creating prom bundle. #46

Closed aaronleesmith closed 4 years ago

aaronleesmith commented 5 years ago

This PR adds support for a custom registry when configuring the prom bundle. The option is backwards compatible and defaults to promClient.register so there should not be issues with existing integrations.

avatarneil commented 4 years ago

Bump, I have recently integrated this middleware into a project and this would be extremely useful. We have to initialize this middleware differently than we do for all of our other middlewares for some of our tests to pass due to this feature not existing (long story, lots of fun with node singletons). @disjunction is there any chance we could get this reviewed and merged?

Also, to make it easier to find this PR from the issue, this fixes #45.

avatarneil commented 4 years ago

That was fast!!! Thank you @disjunction 😄

disjunction commented 4 years ago

np. This has now been released as 6.1.0 on npm along with a couple of minor PR merges.