I want to check the health of my service,having the metrics of each endPoint. My service calls some other services and recieves a Json code, I make templates with it, and then I send it to a http.ResponseWriter.
I searched and I found this package "gocraft/health" but I didn't really understand how it works.
Is there any other way or package to generate metrics or should I just use "gocraft/health.
Thank you in advance
Finally, I choose "gocraft/health", a great library.
Example of usage:
Per the initialization options above, your metrics are aggregated in 5-minute chunks. We'll keep 20 minutes worth of data in memory. Nothing is ever persisted to disk.
You can create as many jobs as you want
Once you start your app, this will expose metrics via a JSON API. You can browse the
/health
endpoint (eg,127.0.0.1:5001/health
) to see the metrics. You will get something like that:For more information and functionality check this link:
https://github.com/gocraft/health