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!
Added support for the prometheus pushgateway.
Checklist
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!