use of com.alipay.lookout.api.composite.MixinMetric in project sofa-rpc by sofastack.
the class RpcLookout method collectServer.
/**
* Collect the RPC server information.
*
* @param rpcServerMetricsModel server information model
*/
public void collectServer(RpcServerLookoutModel rpcServerMetricsModel) {
try {
Id methodProviderId = createMethodProviderId(rpcServerMetricsModel);
MixinMetric methodProviderMetric = Lookout.registry().mixinMetric(methodProviderId);
recordCounterAndTimer(methodProviderMetric, rpcServerMetricsModel);
} catch (Throwable t) {
LOGGER.error(LogCodes.getLog(LogCodes.ERROR_METRIC_REPORT_ERROR), t);
}
}
use of com.alipay.lookout.api.composite.MixinMetric in project sofa-rpc by sofastack.
the class RpcLookout method collectClient.
/**
* Collect the RPC client information.
*
* @param rpcClientMetricsModel client information model
*/
public void collectClient(RpcClientLookoutModel rpcClientMetricsModel) {
try {
Id methodConsumerId = createMethodConsumerId(rpcClientMetricsModel);
MixinMetric methodConsumerMetric = Lookout.registry().mixinMetric(methodConsumerId);
recordCounterAndTimer(methodConsumerMetric, rpcClientMetricsModel);
recordSize(methodConsumerMetric, rpcClientMetricsModel);
} catch (Throwable t) {
LOGGER.error(LogCodes.getLog(LogCodes.ERROR_METRIC_REPORT_ERROR), t);
}
}
Aggregations