Search in sources :

Example 6 with ChannelFactory

use of com.navercorp.pinpoint.grpc.client.ChannelFactory 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)

Example 7 with ChannelFactory

use of com.navercorp.pinpoint.grpc.client.ChannelFactory 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)7 ChannelFactoryBuilder (com.navercorp.pinpoint.grpc.client.ChannelFactoryBuilder)6 DefaultChannelFactoryBuilder (com.navercorp.pinpoint.grpc.client.DefaultChannelFactoryBuilder)6 ClientOption (com.navercorp.pinpoint.grpc.client.config.ClientOption)3 ReconnectExecutor (com.navercorp.pinpoint.profiler.sender.grpc.ReconnectExecutor)3 GeneratedMessageV3 (com.google.protobuf.GeneratedMessageV3)2 HeaderFactory (com.navercorp.pinpoint.grpc.client.HeaderFactory)2 MetaDataType (com.navercorp.pinpoint.profiler.metadata.MetaDataType)2 ManagedChannel (io.grpc.ManagedChannel)2 Empty (com.google.protobuf.Empty)1 AgentHeaderFactory (com.navercorp.pinpoint.grpc.AgentHeaderFactory)1 PSpan (com.navercorp.pinpoint.grpc.trace.PSpan)1 PSpanMessage (com.navercorp.pinpoint.grpc.trace.PSpanMessage)1 SpanGrpc (com.navercorp.pinpoint.grpc.trace.SpanGrpc)1 GrpcMetadataMessageConverter (com.navercorp.pinpoint.profiler.context.grpc.GrpcMetadataMessageConverter)1 DnsExecutorServiceProvider (com.navercorp.pinpoint.profiler.context.provider.grpc.DnsExecutorServiceProvider)1 GrpcNameResolverProvider (com.navercorp.pinpoint.profiler.context.provider.grpc.GrpcNameResolverProvider)1 AgentInfo (com.navercorp.pinpoint.profiler.metadata.AgentInfo)1 ProfilerCommandServiceLocator (com.navercorp.pinpoint.profiler.receiver.ProfilerCommandServiceLocator)1 MetadataGrpcDataSender (com.navercorp.pinpoint.profiler.sender.grpc.MetadataGrpcDataSender)1