use of io.micrometer.core.instrument.binder.jvm.JvmGcMetrics in project pravega by pravega.
the class StatsProviderImpl method init.
@Synchronized
private void init() {
new JvmMemoryMetrics().bindTo(metrics);
new JvmGcMetrics().bindTo(metrics);
new ProcessorMetrics().bindTo(metrics);
new JvmThreadMetrics().bindTo(metrics);
}
use of io.micrometer.core.instrument.binder.jvm.JvmGcMetrics in project snow-owl by b2ihealthcare.
the class SnowOwlPlugin method createRegistry.
private PrometheusMeterRegistry createRegistry(final MonitoringConfiguration monitoringConfig) {
final PrometheusMeterRegistry registry = new PrometheusMeterRegistry(PrometheusConfig.DEFAULT);
Map<String, String> tags = newHashMapWithExpectedSize(1 + monitoringConfig.getTags().size());
// always set the application tag to snow_owl
tags.put("application", "snow_owl");
// override with tags coming from the config file
tags.putAll(monitoringConfig.getTags());
// configure the tags
final List<Tag> commonTags = tags.entrySet().stream().map(entry -> Tag.of(entry.getKey(), entry.getValue())).collect(Collectors.toList());
registry.config().commonTags(commonTags);
// configure default JVM and node metrics
new ClassLoaderMetrics().bindTo(registry);
new JvmGcMetrics().bindTo(registry);
new JvmMemoryMetrics().bindTo(registry);
new JvmThreadMetrics().bindTo(registry);
new UptimeMetrics().bindTo(registry);
new ProcessorMetrics().bindTo(registry);
new LogbackMetrics().bindTo(registry);
new FileDescriptorMetrics().bindTo(registry);
return registry;
}
use of io.micrometer.core.instrument.binder.jvm.JvmGcMetrics in project oap by oaplatform.
the class PrometheusJvmExporter method start.
public void start() {
log.info("enableClassLoaderMetrics = {}, enableJvmMemoryMetrics = {}, enableJvmGcMetrics = {}, enableLogbackMetrics = {}", enableClassLoaderMetrics, enableJvmMemoryMetrics, enableJvmGcMetrics, enableLogbackMetrics);
if (enableClassLoaderMetrics)
new ClassLoaderMetrics().bindTo(Metrics.globalRegistry);
if (enableJvmMemoryMetrics)
new JvmMemoryMetrics().bindTo(Metrics.globalRegistry);
if (enableJvmGcMetrics) {
jvmGcMetrics = new JvmGcMetrics();
jvmGcMetrics.bindTo(Metrics.globalRegistry);
}
if (enableLogbackMetrics) {
logbackMetrics = new LogbackMetrics();
logbackMetrics.bindTo(Metrics.globalRegistry);
}
if (enableJvmThreadMetrics)
new JvmThreadMetrics().bindTo(Metrics.globalRegistry);
}
use of io.micrometer.core.instrument.binder.jvm.JvmGcMetrics in project zipkin by openzipkin.
the class ZipkinPrometheusMetricsConfiguration method prometheusMeterRegistry.
@Bean
@ConditionalOnMissingBean
public PrometheusMeterRegistry prometheusMeterRegistry(PrometheusConfig config, CollectorRegistry registry, Clock clock) {
PrometheusMeterRegistry meterRegistry = new PrometheusMeterRegistry(config, registry, clock);
new JvmMemoryMetrics().bindTo(meterRegistry);
new JvmGcMetrics().bindTo(meterRegistry);
new JvmThreadMetrics().bindTo(meterRegistry);
new ClassLoaderMetrics().bindTo(meterRegistry);
new ProcessorMetrics().bindTo(meterRegistry);
return meterRegistry;
}
use of io.micrometer.core.instrument.binder.jvm.JvmGcMetrics in project vertx-micrometer-metrics by vert-x3.
the class VertxMetricsFactoryImpl method metrics.
@Override
public VertxMetrics metrics(VertxOptions vertxOptions) {
MetricsOptions metricsOptions = vertxOptions.getMetricsOptions();
MicrometerMetricsOptions options;
if (metricsOptions instanceof MicrometerMetricsOptions) {
options = (MicrometerMetricsOptions) metricsOptions;
} else {
options = new MicrometerMetricsOptions(metricsOptions.toJson());
}
BackendRegistry backendRegistry = BackendRegistries.setupBackend(options);
VertxMetricsImpl metrics = new VertxMetricsImpl(options, backendRegistry);
metrics.init();
if (options.isJvmMetricsEnabled()) {
new ClassLoaderMetrics().bindTo(backendRegistry.getMeterRegistry());
new JvmMemoryMetrics().bindTo(backendRegistry.getMeterRegistry());
new JvmGcMetrics().bindTo(backendRegistry.getMeterRegistry());
new ProcessorMetrics().bindTo(backendRegistry.getMeterRegistry());
new JvmThreadMetrics().bindTo(backendRegistry.getMeterRegistry());
}
return metrics;
}
Aggregations