use of com.navercorp.pinpoint.grpc.client.config.SslOption in project pinpoint by naver.
the class SpanGrpcDataSenderProvider method newChannelFactoryBuilder.
private ChannelFactoryBuilder newChannelFactoryBuilder(boolean sslEnable) {
final int channelExecutorQueueSize = grpcTransportConfig.getSpanChannelExecutorQueueSize();
final ClientOption clientOption = grpcTransportConfig.getSpanClientOption();
ChannelFactoryBuilder channelFactoryBuilder = new DefaultChannelFactoryBuilder("SpanGrpcDataSender");
channelFactoryBuilder.setHeaderFactory(headerFactory);
channelFactoryBuilder.setNameResolverProvider(nameResolverProvider);
final ClientInterceptor unaryCallDeadlineInterceptor = new UnaryCallDeadlineInterceptor(grpcTransportConfig.getSpanRequestTimeout());
channelFactoryBuilder.addClientInterceptor(unaryCallDeadlineInterceptor);
// channelFactoryBuilder.addClientInterceptor(discardClientInterceptor);
if (clientInterceptorList != null) {
for (ClientInterceptor clientInterceptor : clientInterceptorList) {
logger.info("addClientInterceptor:{}", clientInterceptor);
channelFactoryBuilder.addClientInterceptor(clientInterceptor);
}
}
channelFactoryBuilder.setExecutorQueueSize(channelExecutorQueueSize);
channelFactoryBuilder.setClientOption(clientOption);
if (sslEnable) {
SslOption sslOption = grpcTransportConfig.getSslOption();
channelFactoryBuilder.setSslOption(sslOption);
}
return channelFactoryBuilder;
}
Aggregations