Search in sources :

Example 1 with StatGrpcDataSender

use of com.navercorp.pinpoint.profiler.sender.grpc.StatGrpcDataSender 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);
}
Also used : StatGrpcDataSender(com.navercorp.pinpoint.profiler.sender.grpc.StatGrpcDataSender) ReconnectExecutor(com.navercorp.pinpoint.profiler.sender.grpc.ReconnectExecutor) ChannelFactory(com.navercorp.pinpoint.grpc.client.ChannelFactory) ChannelFactoryBuilder(com.navercorp.pinpoint.grpc.client.ChannelFactoryBuilder) DefaultChannelFactoryBuilder(com.navercorp.pinpoint.grpc.client.DefaultChannelFactoryBuilder)

Aggregations

ChannelFactory (com.navercorp.pinpoint.grpc.client.ChannelFactory)1 ChannelFactoryBuilder (com.navercorp.pinpoint.grpc.client.ChannelFactoryBuilder)1 DefaultChannelFactoryBuilder (com.navercorp.pinpoint.grpc.client.DefaultChannelFactoryBuilder)1 ReconnectExecutor (com.navercorp.pinpoint.profiler.sender.grpc.ReconnectExecutor)1 StatGrpcDataSender (com.navercorp.pinpoint.profiler.sender.grpc.StatGrpcDataSender)1