use of org.apache.servicecomb.metrics.core.meter.vertx.HttpClientEndpointsMeter in project java-chassis by ServiceComb.
the class VertxMetersInitializer method init.
@Override
public void init(GlobalRegistry globalRegistry, EventBus eventBus, MetricsBootstrapConfig config) {
Registry registry = globalRegistry.getDefaultRegistry();
Id endpointsId = registry.createId(VERTX_ENDPOINTS);
VertxEndpointsMeter clientMeter = new HttpClientEndpointsMeter(endpointsId.withTag(ENDPOINTS_TYPE, ENDPOINTS_CLINET), SharedVertxFactory.getMetricsFactory().getVertxMetrics().getClientEndpointMetricManager().getClientEndpointMetricMap());
SpectatorUtils.registerMeter(registry, clientMeter);
VertxEndpointsMeter serverMeter = new ServerEndpointsMeter(endpointsId.withTag(ENDPOINTS_TYPE, ENDPOINTS_SERVER), SharedVertxFactory.getMetricsFactory().getVertxMetrics().getServerEndpointMetricMap());
SpectatorUtils.registerMeter(registry, serverMeter);
}
use of org.apache.servicecomb.metrics.core.meter.vertx.HttpClientEndpointsMeter in project incubator-servicecomb-java-chassis by apache.
the class VertxMetersInitializer method init.
@Override
public void init(GlobalRegistry globalRegistry, EventBus eventBus, MetricsBootstrapConfig config) {
Registry registry = globalRegistry.getDefaultRegistry();
Id endpointsId = registry.createId(VERTX_ENDPOINTS);
VertxEndpointsMeter clientMeter = new HttpClientEndpointsMeter(endpointsId.withTag(ENDPOINTS_TYPE, ENDPOINTS_CLINET), SharedVertxFactory.getMetricsFactory().getVertxMetrics().getClientEndpointMetricManager().getClientEndpointMetricMap());
SpectatorUtils.registerMeter(registry, clientMeter);
VertxEndpointsMeter serverMeter = new ServerEndpointsMeter(endpointsId.withTag(ENDPOINTS_TYPE, ENDPOINTS_SERVER), SharedVertxFactory.getMetricsFactory().getVertxMetrics().getServerEndpointMetricMap());
SpectatorUtils.registerMeter(registry, serverMeter);
}
Aggregations