2024年3月29日

prometheus类型

摘要: Counter:只增。Gauge:可增可减。Histograms:样本落在桶中,原子统计数量,后面一个bucket包含前面所有bucket计数。一方面,可以在Granafa中使用Heatmap热点图展示;另一方面,可以通过查找桶位置+单个桶内执行插值算法计算百分比对应的近似值,没有Summaries 阅读全文

posted @ 2024-03-29 19:58 王景迁 阅读(32) 评论(0) 推荐(0)

prometheus自定义注册表

摘要: // 在自定义注册表中只有需要的变量,没有默认的Go运行时指标和prometheus指标 registry := prometheus.NewRegistry() test:= prometheus.NewCounter(prometheus.CounterOpts{ Name: "test", H 阅读全文

posted @ 2024-03-29 19:44 王景迁 阅读(29) 评论(0) 推荐(0)

导航