Search in sources :

Example 1 with ServerOption

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);
}
Also used : BindAddress(com.navercorp.pinpoint.collector.receiver.BindAddress) ServerOption(com.navercorp.pinpoint.grpc.server.ServerOption) ExecutorConfiguration(com.navercorp.pinpoint.collector.config.ExecutorConfiguration) Bean(org.springframework.context.annotation.Bean)

Example 2 with ServerOption

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());
}
Also used : ServerOption(com.navercorp.pinpoint.grpc.server.ServerOption) Test(org.junit.Test)

Example 3 with ServerOption

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());
}
Also used : ServerOption(com.navercorp.pinpoint.grpc.server.ServerOption) Test(org.junit.Test)

Example 4 with ServerOption

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);
}
Also used : BindAddress(com.navercorp.pinpoint.collector.receiver.BindAddress) ServerOption(com.navercorp.pinpoint.grpc.server.ServerOption) ExecutorConfiguration(com.navercorp.pinpoint.collector.config.ExecutorConfiguration) Bean(org.springframework.context.annotation.Bean)

Example 5 with ServerOption

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);
}
Also used : BindAddress(com.navercorp.pinpoint.collector.receiver.BindAddress) ServerOption(com.navercorp.pinpoint.grpc.server.ServerOption) ExecutorConfiguration(com.navercorp.pinpoint.collector.config.ExecutorConfiguration) Bean(org.springframework.context.annotation.Bean)

Aggregations

ServerOption (com.navercorp.pinpoint.grpc.server.ServerOption)6 ExecutorConfiguration (com.navercorp.pinpoint.collector.config.ExecutorConfiguration)3 BindAddress (com.navercorp.pinpoint.collector.receiver.BindAddress)3 Test (org.junit.Test)3 Bean (org.springframework.context.annotation.Bean)3