public CloudWatchReporter build() {
if (withJvmMetrics) {
metricRegistry.register("jvm.uptime", (Gauge<Long>) () -> ManagementFactory.getRuntimeMXBean().getUptime());
metricRegistry.register("jvm.current_time", (Gauge<Long>) clock::getTime);
metricRegistry.register("jvm.classes", new ClassLoadingGaugeSet());
metricRegistry.register("jvm.fd_usage", new FileDescriptorRatioGauge());
metricRegistry.register("jvm.buffers", new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer()));
metricRegistry.register("jvm.gc", new GarbageCollectorMetricSet());
metricRegistry.register("jvm.memory", new MemoryUsageGaugeSet());
metricRegistry.register("jvm.thread-states", new ThreadStatesGaugeSet());
}
cwRateUnit = toStandardUnit(rateUnit);
cwDurationUnit = toStandardUnit(durationUnit);
return new CloudWatchReporter(this);
}
CloudWatchReporter.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:codahale-aggregated-metrics-cloudwatch-reporter
作者:
评论列表
文章目录