gin-metrics
gin-metrics copied to clipboard
负载均衡导致的采集问题
因为监控是写在代码里的,导致如果使用k8s上线,并开启负载均衡,会导致这个监控也只能采集到单个pod的数据,有什么解决办法吗
ServiceMonitor ?
可以注册实例到nacos或consul里面,使用prometheus sd采集
Add host or podName as a label so that you can have aggregated/separated views of the metrics on the grafana side.