use of org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry in project incubator-servicecomb-java-chassis by apache.
the class InvocationMetersInitializer method init.
@Override
public void init(GlobalRegistry globalRegistry, EventBus eventBus, MetricsBootstrapConfig config) {
Registry registry = globalRegistry.getDefaultRegistry();
consumerMeters = new ConsumerMeters(registry);
producerMeters = new ProducerMeters(registry);
edgeMeters = new EdgeMeters(registry);
eventBus.register(this);
}
use of org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry in project incubator-servicecomb-java-chassis by apache.
the class OsMetersInitializer method init.
@Override
public void init(GlobalRegistry globalRegistry, EventBus eventBus, MetricsBootstrapConfig config) {
if (!isOsLinux) {
LOGGER.info("only support linux os to collect cpu and net info");
return;
}
Registry registry = globalRegistry.getDefaultRegistry();
osMeter = new OsMeter(registry);
SpectatorUtils.registerMeter(registry, osMeter);
}
use of org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry in project incubator-servicecomb-java-chassis by apache.
the class MetricsBootListener method onAfterRegistry.
@Override
public void onAfterRegistry(BootEvent event) {
slowInvocationLogger = new SlowInvocationLogger(event.getScbEngine());
metricsBootstrap.start(new GlobalRegistry(), EventManager.getEventBus());
}
Aggregations