Search in sources :

Example 1 with MetadataGrpcDataSender

use of com.navercorp.pinpoint.profiler.sender.grpc.MetadataGrpcDataSender in project pinpoint by naver.

the class MetadataGrpcDataSenderProvider method get.

@Override
public EnhancedDataSender<MetaDataType> get() {
    final String collectorIp = grpcTransportConfig.getMetadataCollectorIp();
    final int collectorPort = grpcTransportConfig.getMetadataCollectorPort();
    final boolean sslEnable = grpcTransportConfig.isMetadataSslEnable();
    final int senderExecutorQueueSize = grpcTransportConfig.getMetadataSenderExecutorQueueSize();
    final ChannelFactoryBuilder channelFactoryBuilder = newChannelFactoryBuilder(sslEnable);
    final ChannelFactory channelFactory = channelFactoryBuilder.build();
    final int retryMaxCount = grpcTransportConfig.getMetadataRetryMaxCount();
    final int retryDelayMillis = grpcTransportConfig.getMetadataRetryDelayMillis();
    return new MetadataGrpcDataSender<>(collectorIp, collectorPort, senderExecutorQueueSize, messageConverter, channelFactory, retryMaxCount, retryDelayMillis);
}
Also used : MetadataGrpcDataSender(com.navercorp.pinpoint.profiler.sender.grpc.MetadataGrpcDataSender) 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 MetadataGrpcDataSender (com.navercorp.pinpoint.profiler.sender.grpc.MetadataGrpcDataSender)1