Ringloop / mr-plow

Minimal memory usage, cloud native logstash alternative
Apache License 2.0
28 stars 3 forks source link

Implement an interface for configuration and metrics #37

Open feed3r opened 2 years ago

feed3r commented 2 years ago

We should implement some kind REST API to adjust the configuration (write the configuration file) and to show some metrics such as:

giorgiozoppi commented 2 years ago

Feel free to assign to me. I have some spare time now. Please point out a notion.so group for sharing the design. My idea is to use the simpler: https://github.com/julienschmidt/httprouter HttpRouter and over there map the api. It's less 'invasive' than gogin.

feed3r commented 2 years ago

It wouldb e really useful if we collect some statistics about the system, such as:

Then (but in a second moment, too) we can open some REST interface and use some HTTP routing...but for this, I think we can also use the standard library. Priority is to keep the code as clean and tiny as possible.

We found this very interesting, for example: https://pace.dev/blog/2018/05/09/how-I-write-http-services-after-eight-years.html

giorgiozoppi commented 2 years ago

Here the initial design, please review it: https://scrawny-newsstand-bd9.notion.site/REST-API-Metrics-fcf6e7f4cb6146e6b6bc9c0afc64fba0 @feed3r @DarioBalinzo