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

Added Prometheus PushGateway support #72

Closed
wants to merge 2 commits into from

Conversation

snkirov
Copy link

@snkirov snkirov commented Jul 5, 2022

Added support for the prometheus pushgateway.

Checklist

  • The provided tests still run.
  • I've created new tests where needed.
  • I've updated the documentation if necessary.

Motivation and Context

I needed a swift library, which would allow me to upload metrics to the pushgateway. I developed this solution and decided to suggest it as an improvement to the SwiftPrometheus library, as mentioned in #47.

Description

I did not change any of the existing functionalities, rather I added new ones. I added a repeating timer class, which allows for a process to be repeatedly triggered in the background. In addition to that I added two public functions to the Prometheus client, one for setting up the repeated pushes and one for tearing them down. There are two additional private helper functions, which should make the code easier to follow through.

I ran the available tests locally and also experimented with the framework in a personal project.

Once I receive confirmation that such a change is something that is welcome to this project, I will be more than happy to add additional tests and documentation.

There is a lot of code and I am open for improvements/ suggestions. I would be more than happy to contribute to this project!

@snkirov
Copy link
Author

snkirov commented Jul 11, 2022

Hey @ktoso, I would be very grateful if you or any of the maintainers could give me some feedback on this PR😁

@dankinsoid
Copy link

@snkirov There is not enough opportunity to make requests with Auth headers

@snkirov snkirov closed this Aug 16, 2023
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 this pull request may close these issues.

2 participants