benc-uk / postman-prometheus

Run Postman collections continuously and export results as Prometheus metrics
https://code.benco.io/postman-prometheus/
MIT License
28 stars 18 forks source link

Fetch remote collection URL at interval #6

Closed thim81 closed 2 years ago

thim81 commented 2 years ago

Is your feature request related to a problem? Please describe.

We publish our Postman collection and Postman Environment file on a regular basis to a remote location, as part of a CI/CD flow. The postman-promotheus project would be used to monitor the API through the latest Postman changes.

Currently the Postman collection would only be loaded on StartUp of the express webserver => https://github.com/benc-uk/postman-prometheus/blob/ece229c9beaafa6efa91bd9dc208fccdb838c03c/src/server.js#L108 This would mean that after each change, we would have to restart the "postman-promotheus" application to get the latest changes.

Describe the solution you'd like

To facilitate automation, it would perhaps be interesting to also "reloaded" the remote fetching of the collection URL at a certain interval or after x runs?

Describe alternatives you've considered

We could figure out a way to restart the postman-promotheus application, every time a new Postman collection is made available, but that would mean linking them both more closely together, which is less desired.

Additional context The same would apply for a potential new feature request (#5)