Search in sources :

Example 1 with GcLogger

use of com.netflix.spectator.gc.GcLogger in project iep by Netflix.

the class AtlasRegistryService method startImpl.

@Override
protected void startImpl() throws Exception {
    Config cfg = config.getConfig("netflix.iep");
    registry = new AtlasRegistry(clock, new TypesafeAtlasConfig(cfg));
    registry.start();
    // Add to global registry for http stats and GC logger
    Spectator.globalRegistry().add(registry);
    // Enable GC logger
    gcLogger = new GcLogger();
    if (cfg.getBoolean("atlas.collection.gc")) {
        gcLogger.start(null);
    }
    // Enable JVM data collection
    if (cfg.getBoolean("atlas.collection.jvm")) {
        Jmx.registerStandardMXBeans(registry);
    }
    // Start collection for the registry
    registry.start();
}
Also used : GcLogger(com.netflix.spectator.gc.GcLogger) AtlasConfig(com.netflix.spectator.atlas.AtlasConfig) Config(com.typesafe.config.Config) AtlasRegistry(com.netflix.spectator.atlas.AtlasRegistry)

Aggregations

AtlasConfig (com.netflix.spectator.atlas.AtlasConfig)1 AtlasRegistry (com.netflix.spectator.atlas.AtlasRegistry)1 GcLogger (com.netflix.spectator.gc.GcLogger)1 Config (com.typesafe.config.Config)1