use of com.alipay.lookout.api.Id in project sofa-rpc by sofastack.
the class RpcLookout method collectProvderPubInfo.
/**
* Collect the RPC client information.
*
* @param providerConfig client information model
*/
public void collectProvderPubInfo(final ProviderConfig providerConfig) {
try {
Id providerConfigId = rpcLookoutId.fetchProviderPubId();
Lookout.registry().info(providerConfigId, new Info<ProviderConfig>() {
@Override
public ProviderConfig value() {
return providerConfig;
}
});
} catch (Throwable t) {
LOGGER.error(LogCodes.getLog(LogCodes.ERROR_METRIC_REPORT_ERROR), t);
}
}
use of com.alipay.lookout.api.Id in project sofa-rpc by sofastack.
the class RpcLookoutId method fetchServerConfigId.
private Id fetchServerConfigId(String key) {
Id lookoutId = serverConfigIds.get(key);
if (lookoutId == null) {
synchronized (RpcLookout.class) {
lookoutId = serverConfigIds.get(key);
if (lookoutId == null) {
lookoutId = Lookout.registry().createId(key);
serverConfigIds.put(key, lookoutId);
}
}
}
return lookoutId;
}
Aggregations