use of com.navercorp.pinpoint.grpc.server.ServerOption in project pinpoint by naver.
the class GrpcStatReceiverConfigurationFactory method newAgentReceiverConfig.
@Bean("grpcStatReceiverConfig")
public GrpcStatReceiverConfiguration newAgentReceiverConfig(Environment environment) {
boolean enable = environment.getProperty("collector.receiver.grpc.stat.enable", boolean.class, false);
ServerOption serverOption = newServerOption().build();
BindAddress bindAddress = newBindAddressBuilder().build();
ExecutorConfiguration serverExecutor = newServerExecutorBuilder().build();
ExecutorConfiguration workerExecutor = newWorkerExecutorBuilder().build();
GrpcStreamConfiguration streamConfiguration = newStreamConfigurationBuilder().build();
return new GrpcStatReceiverConfiguration(enable, bindAddress, serverExecutor, workerExecutor, serverOption, streamConfiguration);
}
use of com.navercorp.pinpoint.grpc.server.ServerOption in project pinpoint by naver.
the class GrpcAgentDataReceiverConfigurationTest method serverOption.
@Test
public void serverOption() {
ServerOption serverOption = configuration.getServerOption();
assertEquals(1, serverOption.getKeepAliveTime());
assertEquals(1, serverOption.getKeepAliveTimeout());
assertEquals(1, serverOption.getPermitKeepAliveTime());
assertEquals(1, serverOption.getMaxConnectionIdle());
assertEquals(1, serverOption.getMaxConcurrentCallsPerConnection());
// 1M
assertEquals(1024 * 1024, serverOption.getMaxInboundMessageSize());
// 1K
assertEquals(1024, serverOption.getMaxHeaderListSize());
// 1M
assertEquals(1024 * 1024, serverOption.getFlowControlWindow());
assertEquals(1, serverOption.getHandshakeTimeout());
// 1M
assertEquals(1024 * 1024, serverOption.getReceiveBufferSize());
}
use of com.navercorp.pinpoint.grpc.server.ServerOption in project pinpoint by naver.
the class GrpcSpanReceiverConfigurationTest method serverOption.
@Test
public void serverOption() {
ServerOption serverOption = configuration.getServerOption();
assertEquals(3, serverOption.getKeepAliveTime());
assertEquals(3, serverOption.getKeepAliveTimeout());
assertEquals(3, serverOption.getPermitKeepAliveTime());
assertEquals(3, serverOption.getMaxConnectionIdle());
assertEquals(3, serverOption.getMaxConcurrentCallsPerConnection());
// 3M
assertEquals(3 * 1024 * 1024, serverOption.getMaxInboundMessageSize());
// 3K
assertEquals(3 * 1024, serverOption.getMaxHeaderListSize());
// 3M
assertEquals(3 * 1024 * 1024, serverOption.getFlowControlWindow());
assertEquals(3, serverOption.getHandshakeTimeout());
// 3M
assertEquals(3 * 1024 * 1024, serverOption.getReceiveBufferSize());
}
use of com.navercorp.pinpoint.grpc.server.ServerOption in project pinpoint by naver.
the class GrpcSpanReceiverConfigurationFactory method newAgentReceiverConfig.
@Bean("grpcSpanReceiverConfig")
public GrpcSpanReceiverConfiguration newAgentReceiverConfig(Environment environment) {
boolean enable = environment.getProperty("collector.receiver.grpc.span.enable", boolean.class, false);
ServerOption serverOption = newServerOption().build();
BindAddress bindAddress = newBindAddressBuilder().build();
ExecutorConfiguration serverExecutor = newServerExecutorBuilder().build();
ExecutorConfiguration workerExecutor = newWorkerExecutorBuilder().build();
GrpcStreamConfiguration streamConfiguration = newStreamConfigurationBuilder().build();
return new GrpcSpanReceiverConfiguration(enable, bindAddress, serverExecutor, workerExecutor, serverOption, streamConfiguration);
}
use of com.navercorp.pinpoint.grpc.server.ServerOption in project pinpoint by naver.
the class GrpcAgentDataReceiverConfigurationFactory method newAgentReceiverConfig.
@Bean("grpcAgentReceiverConfig")
public GrpcAgentDataReceiverConfiguration newAgentReceiverConfig(Environment environment) {
boolean enable = environment.getProperty("collector.receiver.grpc.agent.enable", boolean.class, false);
ServerOption serverOption = newServerOption().build();
BindAddress bindAddress = newBindAddressBuilder().build();
ExecutorConfiguration serverExecutor = newServerExecutorBuilder().build();
ExecutorConfiguration workerExecutor = newWorkerExecutorBuilder().build();
return new GrpcAgentDataReceiverConfiguration(enable, bindAddress, serverExecutor, workerExecutor, serverOption);
}
Aggregations