gin-metrics icon indicating copy to clipboard operation
gin-metrics copied to clipboard

负载均衡导致的采集问题

Open boyaovo opened this issue 2 years ago • 3 comments

因为监控是写在代码里的,导致如果使用k8s上线,并开启负载均衡,会导致这个监控也只能采集到单个pod的数据,有什么解决办法吗

boyaovo avatar May 05 '23 11:05 boyaovo

ServiceMonitor ?

defp avatar Oct 20 '23 14:10 defp

可以注册实例到nacos或consul里面,使用prometheus sd采集

typ431127 avatar Mar 11 '24 05:03 typ431127

Add host or podName as a label so that you can have aggregated/separated views of the metrics on the grafana side.

weidaolee avatar Aug 01 '24 08:08 weidaolee