2024年3月29日

prometheus类型

摘要: Counter:只增。Gauge:可增可减。Histograms:落在桶中计数,后面一个bucket包含前面所有bucket计数,在Granafa中使用Heatmap热点图展示。Summaries:存储分位数,例如95%区间范围,一般不用,精密计算比较损耗性能。 带标签的类型NewCounter - 阅读全文

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

prometheus自定义注册表

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

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

导航