use of com.navercorp.pinpoint.profiler.sender.grpc.ReconnectExecutor in project pinpoint by naver.
the class AgentGrpcDataSenderProvider method get.
@Override
public EnhancedDataSender<MetaDataType> get() {
final String collectorIp = grpcTransportConfig.getAgentCollectorIp();
final int collectorPort = grpcTransportConfig.getAgentCollectorPort();
final boolean sslEnable = grpcTransportConfig.isAgentSslEnable();
final int senderExecutorQueueSize = grpcTransportConfig.getAgentSenderExecutorQueueSize();
final ChannelFactoryBuilder channelFactoryBuilder = newChannelFactoryBuilder(sslEnable);
ChannelFactory channelFactory = channelFactoryBuilder.build();
final ReconnectExecutor reconnectExecutor = reconnectExecutorProvider.get();
final ProfilerCommandServiceLocator profilerCommandServiceLocator = createProfilerCommandServiceLocator(activeTraceRepository);
MessageConverter<MetaDataType, GeneratedMessageV3> messageConverter = this.messageConverter;
return newAgentGrpcDataSender(collectorIp, collectorPort, senderExecutorQueueSize, messageConverter, channelFactory, reconnectExecutor, retransmissionExecutor, profilerCommandServiceLocator);
}
use of com.navercorp.pinpoint.profiler.sender.grpc.ReconnectExecutor 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;
}
use of com.navercorp.pinpoint.profiler.sender.grpc.ReconnectExecutor in project pinpoint by naver.
the class StatGrpcDataSenderProvider method get.
@Override
public DataSender<MetricType> get() {
final String collectorIp = grpcTransportConfig.getStatCollectorIp();
final int collectorPort = grpcTransportConfig.getStatCollectorPort();
final boolean sslEnable = grpcTransportConfig.isStatSslEnable();
final int senderExecutorQueueSize = grpcTransportConfig.getStatSenderExecutorQueueSize();
final ChannelFactoryBuilder channelFactoryBuilder = newChannelFactoryBuilder(sslEnable);
final ChannelFactory channelFactory = channelFactoryBuilder.build();
// not singleton
ReconnectExecutor reconnectExecutor = reconnectExecutorProvider.get();
return new StatGrpcDataSender(collectorIp, collectorPort, senderExecutorQueueSize, messageConverter, reconnectExecutor, channelFactory);
}
Aggregations