Search in sources :

Example 1 with ServerEndpointsMeter

use of org.apache.servicecomb.metrics.core.meter.vertx.ServerEndpointsMeter 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);
}
Also used : VertxEndpointsMeter(org.apache.servicecomb.metrics.core.meter.vertx.VertxEndpointsMeter) HttpClientEndpointsMeter(org.apache.servicecomb.metrics.core.meter.vertx.HttpClientEndpointsMeter) ServerEndpointsMeter(org.apache.servicecomb.metrics.core.meter.vertx.ServerEndpointsMeter) GlobalRegistry(org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry) Registry(com.netflix.spectator.api.Registry) Id(com.netflix.spectator.api.Id)

Example 2 with ServerEndpointsMeter

use of org.apache.servicecomb.metrics.core.meter.vertx.ServerEndpointsMeter 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);
}
Also used : VertxEndpointsMeter(org.apache.servicecomb.metrics.core.meter.vertx.VertxEndpointsMeter) HttpClientEndpointsMeter(org.apache.servicecomb.metrics.core.meter.vertx.HttpClientEndpointsMeter) ServerEndpointsMeter(org.apache.servicecomb.metrics.core.meter.vertx.ServerEndpointsMeter) GlobalRegistry(org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry) Registry(com.netflix.spectator.api.Registry) Id(com.netflix.spectator.api.Id)

Aggregations

Id (com.netflix.spectator.api.Id)2 Registry (com.netflix.spectator.api.Registry)2 GlobalRegistry (org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry)2 HttpClientEndpointsMeter (org.apache.servicecomb.metrics.core.meter.vertx.HttpClientEndpointsMeter)2 ServerEndpointsMeter (org.apache.servicecomb.metrics.core.meter.vertx.ServerEndpointsMeter)2 VertxEndpointsMeter (org.apache.servicecomb.metrics.core.meter.vertx.VertxEndpointsMeter)2