use of com.netflix.spectator.atlas.AtlasRegistry 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();
}
use of com.netflix.spectator.atlas.AtlasRegistry in project iep by Netflix.
the class AtlasModuleTest method registryIsBound.
@Test
public void registryIsBound() {
Injector injector = Guice.createInjector(new AtlasModule());
Registry registry = injector.getInstance(Registry.class);
Assert.assertTrue(registry instanceof AtlasRegistry);
}
use of com.netflix.spectator.atlas.AtlasRegistry in project iep by Netflix.
the class AtlasRegistryServiceTest method validTagCharacters.
@Test
public void validTagCharacters() throws Exception {
AtlasRegistryService service = new AtlasRegistryService();
AtlasRegistry registry = (AtlasRegistry) service.getRegistry();
AtlasConfig config = (AtlasConfig) registry.config();
Assert.assertEquals("-._A-Za-z0-9", config.validTagCharacters());
Assert.assertEquals("-._A-Za-z0-9^~", config.validTagValueCharacters().get("nf.cluster"));
Assert.assertEquals("-._A-Za-z0-9^~", config.validTagValueCharacters().get("nf.asg"));
Assert.assertNull(config.validTagValueCharacters().get("nf.zone"));
service.stop();
}
Aggregations