-
Notifications
You must be signed in to change notification settings - Fork 821
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
Expose request handler of Prometheus exporter #1872
Comments
For more information, someone already tried to work on this here: #1701 however we agreed on a different way of solving the issue (pretty much what you suggested) instead of what the original PR was doing. Are you interested in contributing this @weyert or you should we add a label to say that its open for anyone to contribute ? |
@vmarchaud Sure, if you like my suggestion, I would be happy to work on a PR to apply the suggestion. Might take a bit of time as I need to get used to the code base a bit more :) |
@vmarchaud I have started working on the pull request. This library is using mocha/chai and I don't have real experience with these testing libraries mainly jest. I will come back to the unit test once I found their version of |
@weyert We generally use |
Is your feature request related to a problem? Please describe.
I would like to reuse the request handler that's implemented by the Prometheus exporter so that it can be used by different server frameworks in Node.js
Describe the solution you'd like
If the currently private request handler method is exposed by the Prometheus exporter it can be used by a wide variety of server framework in Node.js, such as Express, Koa, Hapi etc.
If you want to expose the endpoint using Express you could do something like:
Alternatively, if you want to expose the endpoint using Koa:
Describe alternatives you've considered
N/A
Additional context
Allow to use an existing endpoint to return Prometheus metrics based on the opentelemetry prometheus exporter implementation.
The text was updated successfully, but these errors were encountered: