Add prometheus metrics API
Is your enhancement proposal related to a problem? Please describe.
Currently, Zadig services do not have metrics monitoring, and it will bring about constant problems in perception, discovery, and analysis.
Describe the solution you'd like
Add Prometheus metrics API for each service of Zadig.
Describe alternatives you've considered
It may be better to use OpenTelemetry to increase support for metrics API, but OpenTelemetry's current support for metrics is not mature yet, so for now, OpenTelemetry is not used to meet the needs of metrics monitoring.
Additional context
We can refer to the example here: Instrumenting a Go application for Prometheus
Assign this issue to me, i can add prometheus metrics for services.
Components such as hubagent, cron, predator, reaper,plugins are schedued services. These components need prometheus node-exporter to report metrics to prometheus instead of waiting for prometheus to pull metrics from them. @flyer103
Metrics API could be add to hub-agent / cron / predator / reaper later.
hub-agent is a resident service that connects to Zadig cluster. The metrics API may not be added for the time being, and its design may be changed in the future.
Prometheus metrics API has been added to service Aslan which bears the majority of the request pressure, for more details, please refer to this link: https://docs.koderover.com/zadig/ZadigX%20dev/stable/high-availability/#prometheus-%E9%85%8D%E7%BD%AE