Search in sources :

Example 1 with GarbageCollectorMetricSet

use of com.spotify.metrics.jvm.GarbageCollectorMetricSet in project apollo by spotify.

the class MetricsModule method semanticMetricRegistry.

@Provides
@Singleton
public SemanticMetricRegistry semanticMetricRegistry() {
    final SemanticMetricRegistry metricRegistry = new SemanticMetricRegistry();
    LOG.info("Creating SemanticMetricRegistry");
    // register JVM metricSets, using an empty MetricId as the FastForwardReporter will prepend
    // the injected MetricId.
    metricRegistry.register(MetricId.EMPTY, new MemoryUsageGaugeSet());
    metricRegistry.register(MetricId.EMPTY, new GarbageCollectorMetricSet());
    metricRegistry.register(MetricId.EMPTY, new ThreadStatesMetricSet());
    metricRegistry.register(MetricId.EMPTY, CpuGaugeSet.create());
    metricRegistry.register(MetricId.EMPTY, new FileDescriptorGaugeSet());
    return metricRegistry;
}
Also used : MemoryUsageGaugeSet(com.spotify.metrics.jvm.MemoryUsageGaugeSet) ThreadStatesMetricSet(com.spotify.metrics.jvm.ThreadStatesMetricSet) FileDescriptorGaugeSet(com.spotify.metrics.jvm.FileDescriptorGaugeSet) SemanticMetricRegistry(com.spotify.metrics.core.SemanticMetricRegistry) GarbageCollectorMetricSet(com.spotify.metrics.jvm.GarbageCollectorMetricSet) Singleton(com.google.inject.Singleton) Provides(com.google.inject.Provides)

Aggregations

Provides (com.google.inject.Provides)1 Singleton (com.google.inject.Singleton)1 SemanticMetricRegistry (com.spotify.metrics.core.SemanticMetricRegistry)1 FileDescriptorGaugeSet (com.spotify.metrics.jvm.FileDescriptorGaugeSet)1 GarbageCollectorMetricSet (com.spotify.metrics.jvm.GarbageCollectorMetricSet)1 MemoryUsageGaugeSet (com.spotify.metrics.jvm.MemoryUsageGaugeSet)1 ThreadStatesMetricSet (com.spotify.metrics.jvm.ThreadStatesMetricSet)1