Skip to content

Pushgateway integration #89

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

Closed
Crown421 opened this issue Aug 10, 2023 · 3 comments · Fixed by #92
Closed

Pushgateway integration #89

Crown421 opened this issue Aug 10, 2023 · 3 comments · Fixed by #92
Assignees

Comments

@Crown421
Copy link

Hey, I really like this package, and I think I would like to start using it.
However, as we briefly talked about at JuliaCon, I think it would be great to also make this usable with pushgateway.

I think it would be very useful to have some method

push_metrics(m::meter, ::pushgatewayconfig)

that pushes a meter object directly to pushgateway. The API is extremely simple, can be done with a simple curl call see docs here. I am not currently familiar enough to know if maybe HTTP.jl can also do it in a similar fashion. I am not sure if HTTP.jl is already a dependency of an OpenTelemetry.jl component, if not, maybe there could be a PackageExtension?

The pushgatewayconfig would at minimum be some URL, but in some cases additional details could go in here as well (specific port, authentication details, ...)

Let me know what you think, happy to contribute/ help.

@findmyway
Copy link
Member

Hey Steffen,

Glad to hear from you 🤗

  1. HTTP.jl should be enough to do the work. And it's already a dependency here https://github.com/oolong-dev/OpenTelemetry.jl/blob/master/src/exporter/prometheus/Project.toml
  2. I think the format is the same as the pull-based approach. Do correct me if I'm wrong here.

Contributions are always welcomed. (In case you are unfamiliar with the code structure, I may implement it later this Sunday.)

@findmyway
Copy link
Member

After some initial investigations, the format is slightly different compared to the pull based approach. But in general, it should be easy to implement.

By the way, push gateway and remote write are two different concepts. I created another issue #90 to track the latter.

@Crown421
Copy link
Author

Hey, thank you for looking at it. I am indeed not yet familiar with the code base, sadly don't have headspace this weekend.

Indeed, "vanilla" Prometheus does not accept remote writes, and hence uses pushgateway as a solution for the use case, which has its own pros and cons.

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

Successfully merging a pull request may close this issue.

2 participants