use of io.micrometer.core.instrument.binder.jvm.JvmGcMetrics in project iaf by ibissource.
the class IbisContext method initMetrics.
private void initMetrics() {
if (meterRegistry != null) {
meterRegistry.config().commonTags("instance", APP_CONSTANTS.getString("instance.name", ""), "ff_version", APP_CONSTANTS.getProperty("application.version"), "hostname", Misc.getHostname(), "dtap.stage", APP_CONSTANTS.getProperty("dtap.stage"));
// These classes are for exposing JVM specific metrics
new ClassLoaderMetrics().bindTo(meterRegistry);
new JvmMemoryMetrics().bindTo(meterRegistry);
new JvmGcMetrics().bindTo(meterRegistry);
new ProcessorMetrics().bindTo(meterRegistry);
new JvmThreadMetrics().bindTo(meterRegistry);
}
}
use of io.micrometer.core.instrument.binder.jvm.JvmGcMetrics in project dolphin-platform by canoo.
the class MetricsModule method initialize.
@Override
public void initialize(final ServerCoreComponents coreComponents) {
final PlatformConfiguration configuration = coreComponents.getConfiguration();
final ServletContext servletContext = coreComponents.getInstance(ServletContext.class);
if (!configuration.getBooleanProperty(METRICS_NOOP_PROPERTY, true)) {
final PrometheusMeterRegistry prometheusRegistry = new PrometheusMeterRegistry(PrometheusConfig.DEFAULT);
final List<Tag> tagList = TagUtil.convertTags(ContextManagerImpl.getInstance().getGlobalContexts());
new ClassLoaderMetrics(tagList).bindTo(prometheusRegistry);
new JvmMemoryMetrics(tagList).bindTo(prometheusRegistry);
new JvmGcMetrics(tagList).bindTo(prometheusRegistry);
new ProcessorMetrics(tagList).bindTo(prometheusRegistry);
new JvmThreadMetrics(tagList).bindTo(prometheusRegistry);
servletContext.addFilter(METRICS_SERVLET_FILTER_NAME, new RequestMetricsFilter()).addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), true, ALL_URL_MAPPING);
servletContext.addListener(new MetricsHttpSessionListener());
servletContext.addServlet(METRICS_SERVLET_NAME, new MetricsServlet(prometheusRegistry)).addMapping(configuration.getProperty(METRICS_ENDPOINT_PROPERTY));
MetricsImpl.getInstance().init(prometheusRegistry);
}
}
use of io.micrometer.core.instrument.binder.jvm.JvmGcMetrics in project hono by eclipse.
the class AbstractServiceApplication method enableJvmMetrics.
/**
* Enables collection of JVM related metrics.
* <p>
* Enables collection of Memory, Thread, GC and Processor metrics.
*/
protected void enableJvmMetrics() {
new ProcessorMetrics().bindTo(meterRegistry);
new JvmMemoryMetrics().bindTo(meterRegistry);
new JvmThreadMetrics().bindTo(meterRegistry);
new FileDescriptorMetrics().bindTo(meterRegistry);
this.jvmGcMetrics = new JvmGcMetrics();
jvmGcMetrics.bindTo(meterRegistry);
}
use of io.micrometer.core.instrument.binder.jvm.JvmGcMetrics in project vertx-micrometer-metrics by vert-x3.
the class MetricsExamples method instrumentJVM.
public void instrumentJVM() {
MeterRegistry registry = BackendRegistries.getDefaultNow();
new ClassLoaderMetrics().bindTo(registry);
new JvmMemoryMetrics().bindTo(registry);
new JvmGcMetrics().bindTo(registry);
new ProcessorMetrics().bindTo(registry);
new JvmThreadMetrics().bindTo(registry);
}
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);
}
Aggregations