Skip to content
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

Support for Prometheus #1736

Open
gaby opened this issue Mar 13, 2024 · 3 comments
Open

Support for Prometheus #1736

gaby opened this issue Mar 13, 2024 · 3 comments

Comments

@gaby
Copy link
Contributor

gaby commented Mar 13, 2024

@erikdubbelboer I notice multiple Prometheus solutions for fasthttp are just using the fasthttp adaptor to handle calling the prometheus net/http handler.

I did some googling at there was an issue opened in the Prometheus Golang Client back in 2017. Basically the promhttp will have to be converted to promfasthttp to allow fasthttp have native prometheus.

Someone created a draft of this back in 2017 but it's way out of date. That draft can be found here: krisdioles/client_golang@20b36c8

The current promhttp can be found here (this one would need to be converted to fasthttp): https://github.com/prometheus/client_golang/blob/main/prometheus/promhttp/http.go

I reached out to the Prometheus dev but they suggested this should be handle in this repo or in the prometheus-community as a new module or I can host a module if that also helps get this done.

Discussion here: prometheus/client_golang#356

I figured posting here and asking you if this is something the fasthttp team can do to integrate Prometheus metrics into fasthttp. This will greatly enhance the fasthttp ecosystem as a whole.

@erikdubbelboer
Copy link
Collaborator

I'm afraid I don't have time to do that. But a pull request is of course always welcome!

@ksw2000
Copy link
Contributor

ksw2000 commented Aug 7, 2024

Hello @gaby, in concrete terms, what features should be implemented in fasthttp to integrate with Prometheus?

@gaby
Copy link
Contributor Author

gaby commented Aug 7, 2024

@ksw2000 The promhttp has to be converted to fasthttp, although It probably had to go in a separate module to not force the dependecies on everyone.

The code is here https://github.com/prometheus/client_golang/blob/main/prometheus/promhttp/http.go

The current solution is to use fasthttp adaptor. Which is probably good enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants