use of com.navercorp.pinpoint.profiler.sender.grpc.StreamState in project pinpoint by naver.
the class SpanGrpcDataSenderProvider method get.
@Override
public DataSender<SpanType> get() {
final String collectorIp = grpcTransportConfig.getSpanCollectorIp();
final int collectorPort = grpcTransportConfig.getSpanCollectorPort();
final boolean sslEnable = grpcTransportConfig.isSpanSslEnable();
final int senderExecutorQueueSize = grpcTransportConfig.getSpanSenderExecutorQueueSize();
final ChannelFactoryBuilder channelFactoryBuilder = newChannelFactoryBuilder(sslEnable);
final ChannelFactory channelFactory = channelFactoryBuilder.build();
final ReconnectExecutor reconnectExecutor = this.reconnectExecutor.get();
ClientOption spanClientOption = grpcTransportConfig.getSpanClientOption();
final StreamState failState = new SimpleStreamState(spanClientOption.getLimitCount(), spanClientOption.getLimitTime());
logger.info("failState:{}", failState);
final SpanGrpcDataSender spanGrpcDataSender = new SpanGrpcDataSender(collectorIp, collectorPort, senderExecutorQueueSize, messageConverter, reconnectExecutor, channelFactory, failState);
registerChannelzReporter(spanGrpcDataSender);
return spanGrpcDataSender;
}
Aggregations