目录 搜索 展开 简介说明 数据采集(Telegraf + Jmxtrans) 1、数据采集(Telegraf) 2、应用信息采集(Jmxtrans-Agent) 3、业务度量采集(Metrics) 4、业务度量采集(Micrometer) 4.1、Micrometer 简介 4.2、Micrometer 代码示例 Gauge(仪表) Counter (计数器) Timer (计时器) LongTaskTimer Summary 定义 DemoMetrics 数据存储(InfluxDB) 数据存储(TDengine) 监控预警(Kapacitor ) 数据展现(Grafana) 数据展现(Chronograf) 数据存储(Loki) 暂无相关搜索结果! 阅读次数:234 本文档使用 MinDoc 发布 Counter (计数器) counter是计数器,特征是只增不减。counter通常用来表示业务的请求次数之类的只增不减的指标。通常会使用counter的increment()方法或者increment(int n)方法,分别增加1和n。示例: MeterRegistry registry = new SimpleMeterRegistry(); // 写法一 Counter counter = registry.counter("counter"); // 写法二 Counter counter = Counter .builder("counter") .baseUnit("beans") // optional .description("a description of what this counter does") // optional .tags("region", "test") // optional .register(registry); Flux.interval(Duration.ofMillis(10)) .doOnEach(d -> { if (rand.nextDouble() + 0.1 > 0) { counter.increment(); } }) .blockLast();复制作者:Jeebiz 创建时间:2023-04-27 14:31最后编辑:Jeebiz 更新时间:2024-02-26 11:18
counter是计数器,特征是只增不减。counter通常用来表示业务的请求次数之类的只增不减的指标。通常会使用counter的increment()方法或者increment(int n)方法,分别增加1和n。示例: MeterRegistry registry = new SimpleMeterRegistry(); // 写法一 Counter counter = registry.counter("counter"); // 写法二 Counter counter = Counter .builder("counter") .baseUnit("beans") // optional .description("a description of what this counter does") // optional .tags("region", "test") // optional .register(registry); Flux.interval(Duration.ofMillis(10)) .doOnEach(d -> { if (rand.nextDouble() + 0.1 > 0) { counter.increment(); } }) .blockLast();复制作者:Jeebiz 创建时间:2023-04-27 14:31最后编辑:Jeebiz 更新时间:2024-02-26 11:18