diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/CollectorGrpcConfiguration.java b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/CollectorGrpcConfiguration.java index 3aa0cfdaae1c..2b864d471004 100644 --- a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/CollectorGrpcConfiguration.java +++ b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/CollectorGrpcConfiguration.java @@ -18,10 +18,13 @@ package com.navercorp.pinpoint.collector.grpc; import com.codahale.metrics.MetricRegistry; -import com.navercorp.pinpoint.collector.grpc.config.GrpcAgentDataReceiverConfiguration; +import com.navercorp.pinpoint.collector.grpc.config.GrpcAgentConfiguration; +import com.navercorp.pinpoint.collector.grpc.config.GrpcAgentReceiverConfiguration; import com.navercorp.pinpoint.collector.grpc.config.GrpcComponentConfiguration; import com.navercorp.pinpoint.collector.grpc.config.GrpcKeepAliveScheduler; +import com.navercorp.pinpoint.collector.grpc.config.GrpcSpanConfiguration; import com.navercorp.pinpoint.collector.grpc.config.GrpcSpanReceiverConfiguration; +import com.navercorp.pinpoint.collector.grpc.config.GrpcStatConfiguration; import com.navercorp.pinpoint.collector.grpc.config.GrpcStatReceiverConfiguration; import com.navercorp.pinpoint.collector.monitor.MonitoringExecutors; import com.navercorp.pinpoint.common.server.executor.ExecutorCustomizer; @@ -36,8 +39,14 @@ @Configuration @Import({ GrpcComponentConfiguration.class, - GrpcAgentDataReceiverConfiguration.class, + + GrpcAgentReceiverConfiguration.class, + GrpcAgentConfiguration.class, + + GrpcSpanConfiguration.class, GrpcSpanReceiverConfiguration.class, + + GrpcStatConfiguration.class, GrpcStatReceiverConfiguration.class, GrpcKeepAliveScheduler.class diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentDataReceiverConfiguration.java b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentConfiguration.java similarity index 75% rename from collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentDataReceiverConfiguration.java rename to collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentConfiguration.java index 669e9e0cf616..fff6e07ec4a3 100644 --- a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentDataReceiverConfiguration.java +++ b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentConfiguration.java @@ -20,10 +20,8 @@ import com.navercorp.pinpoint.collector.handler.RequestResponseHandler; import com.navercorp.pinpoint.collector.handler.SimpleAndRequestResponseHandler; import com.navercorp.pinpoint.collector.manage.HandlerManager; -import com.navercorp.pinpoint.collector.monitor.MonitoringExecutors; import com.navercorp.pinpoint.collector.receiver.AgentDispatchHandler; import com.navercorp.pinpoint.collector.receiver.AgentLifeCycleChangeEventHandler; -import com.navercorp.pinpoint.collector.receiver.BindAddress; import com.navercorp.pinpoint.collector.receiver.DispatchHandler; import com.navercorp.pinpoint.collector.receiver.DispatchHandlerFactoryBean; import com.navercorp.pinpoint.collector.receiver.grpc.GrpcReceiver; @@ -38,11 +36,8 @@ import com.navercorp.pinpoint.collector.service.AgentInfoService; import com.navercorp.pinpoint.collector.service.async.AgentEventAsyncTaskService; import com.navercorp.pinpoint.collector.service.async.AgentLifeCycleAsyncTaskService; -import com.navercorp.pinpoint.common.server.thread.MonitoringExecutorProperties; import com.navercorp.pinpoint.common.server.util.AcceptedTimeService; -import com.navercorp.pinpoint.common.server.util.CallerUtils; import com.navercorp.pinpoint.common.server.util.IgnoreAddressFilter; -import com.navercorp.pinpoint.grpc.server.ServerOption; import com.navercorp.pinpoint.grpc.server.lifecycle.DefaultPingEventHandler; import com.navercorp.pinpoint.grpc.server.lifecycle.DefaultPingSessionRegistry; import com.navercorp.pinpoint.grpc.server.lifecycle.PingEventHandler; @@ -56,96 +51,22 @@ import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.core.env.Environment; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; -import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.concurrent.Executor; -import java.util.concurrent.ExecutorService; /** * @author emeroad */ @Configuration -public class GrpcAgentDataReceiverConfiguration { +public class GrpcAgentConfiguration { - private static final Logger logger = LogManager.getLogger(GrpcAgentDataReceiverConfiguration.class); + private static final Logger logger = LogManager.getLogger(GrpcAgentConfiguration.class); - public GrpcAgentDataReceiverConfiguration() { - } - - @Bean - @Validated - @ConfigurationProperties("collector.receiver.grpc.agent.bindaddress") - public BindAddress.Builder grpcAgentBindAddressBuilder() { - BindAddress.Builder builder = BindAddress.newBuilder(); - builder.setPort(9991); - return builder; - } - - @Bean - @Validated - @ConfigurationProperties("collector.receiver.grpc.agent.server.executor") - public MonitoringExecutorProperties grpcAgentServerExecutorProperties() { - return new MonitoringExecutorProperties(); - } - - @Bean - @Validated - @ConfigurationProperties("collector.receiver.grpc.agent.server-call.executor") - public MonitoringExecutorProperties grpcAgentServerCallExecutorProperties() { - return new MonitoringExecutorProperties(); - } - - @Bean - @Validated - @ConfigurationProperties("collector.receiver.grpc.agent.worker.executor") - public MonitoringExecutorProperties grpcAgentWorkerExecutorProperties() { - return new MonitoringExecutorProperties(); - } - - @Bean - @ConfigurationProperties("collector.receiver.grpc.agent") - public GrpcPropertiesServerOptionBuilder grpcAgentServerOption() { - // Server option - return new GrpcPropertiesServerOptionBuilder(); - } - - @Bean - public GrpcReceiverProperties grpcAgentReceiverProperties(Environment environment) { - boolean enable = environment.getProperty("collector.receiver.grpc.agent.enable", boolean.class, false); - - ServerOption serverOption = grpcAgentServerOption().build(); - BindAddress bindAddress = grpcAgentBindAddressBuilder().build(); - - return new GrpcReceiverProperties(enable, bindAddress, serverOption); - } - - @Bean - public FactoryBean grpcAgentWorkerExecutor(MonitoringExecutors executors) { - String beanName = CallerUtils.getCallerMethodName(); - MonitoringExecutorProperties properties = grpcAgentWorkerExecutorProperties(); - return executors.newExecutorFactoryBean(properties, beanName); - } - - - @Bean - public FactoryBean grpcAgentServerExecutor(MonitoringExecutors executors) { - String beanName = CallerUtils.getCallerMethodName(); - MonitoringExecutorProperties properties = grpcAgentServerExecutorProperties(); - return executors.newExecutorFactoryBean(properties, beanName); - } - - @Bean - public FactoryBean grpcAgentServerCallExecutor(MonitoringExecutors executors) { - String beanName = CallerUtils.getCallerMethodName(); - MonitoringExecutorProperties properties = grpcAgentServerCallExecutorProperties(); - properties.setLogRate(1); - return executors.newExecutorFactoryBean(properties, beanName); + public GrpcAgentConfiguration() { } @Bean diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentReceiverConfiguration.java b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentReceiverConfiguration.java new file mode 100644 index 000000000000..e50dc11cc379 --- /dev/null +++ b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentReceiverConfiguration.java @@ -0,0 +1,111 @@ +/* + * Copyright 2021 NAVER Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.navercorp.pinpoint.collector.grpc.config; + +import com.navercorp.pinpoint.collector.monitor.MonitoringExecutors; +import com.navercorp.pinpoint.collector.receiver.BindAddress; +import com.navercorp.pinpoint.common.server.thread.MonitoringExecutorProperties; +import com.navercorp.pinpoint.common.server.util.CallerUtils; +import com.navercorp.pinpoint.grpc.server.ServerOption; +import org.springframework.beans.factory.FactoryBean; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; +import org.springframework.validation.annotation.Validated; + +import java.util.concurrent.ExecutorService; + +/** + * @author emeroad + */ +@Configuration +public class GrpcAgentReceiverConfiguration { + + public GrpcAgentReceiverConfiguration() { + } + + @Bean + @Validated + @ConfigurationProperties("collector.receiver.grpc.agent.bindaddress") + public BindAddress.Builder grpcAgentBindAddressBuilder() { + BindAddress.Builder builder = BindAddress.newBuilder(); + builder.setPort(9991); + return builder; + } + + @Bean + @Validated + @ConfigurationProperties("collector.receiver.grpc.agent.server.executor") + public MonitoringExecutorProperties grpcAgentServerExecutorProperties() { + return new MonitoringExecutorProperties(); + } + + @Bean + @Validated + @ConfigurationProperties("collector.receiver.grpc.agent.server-call.executor") + public MonitoringExecutorProperties grpcAgentServerCallExecutorProperties() { + return new MonitoringExecutorProperties(); + } + + @Bean + @Validated + @ConfigurationProperties("collector.receiver.grpc.agent.worker.executor") + public MonitoringExecutorProperties grpcAgentWorkerExecutorProperties() { + return new MonitoringExecutorProperties(); + } + + @Bean + @ConfigurationProperties("collector.receiver.grpc.agent") + public GrpcPropertiesServerOptionBuilder grpcAgentServerOption() { + // Server option + return new GrpcPropertiesServerOptionBuilder(); + } + + @Bean + public GrpcReceiverProperties grpcAgentReceiverProperties(Environment environment) { + boolean enable = environment.getProperty("collector.receiver.grpc.agent.enable", boolean.class, false); + + ServerOption serverOption = grpcAgentServerOption().build(); + BindAddress bindAddress = grpcAgentBindAddressBuilder().build(); + + return new GrpcReceiverProperties(enable, bindAddress, serverOption); + } + + @Bean + public FactoryBean grpcAgentWorkerExecutor(MonitoringExecutors executors) { + String beanName = CallerUtils.getCallerMethodName(); + MonitoringExecutorProperties properties = grpcAgentWorkerExecutorProperties(); + return executors.newExecutorFactoryBean(properties, beanName); + } + + + @Bean + public FactoryBean grpcAgentServerExecutor(MonitoringExecutors executors) { + String beanName = CallerUtils.getCallerMethodName(); + MonitoringExecutorProperties properties = grpcAgentServerExecutorProperties(); + return executors.newExecutorFactoryBean(properties, beanName); + } + + @Bean + public FactoryBean grpcAgentServerCallExecutor(MonitoringExecutors executors) { + String beanName = CallerUtils.getCallerMethodName(); + MonitoringExecutorProperties properties = grpcAgentServerCallExecutorProperties(); + properties.setLogRate(1); + return executors.newExecutorFactoryBean(properties, beanName); + } +} \ No newline at end of file diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcSpanConfiguration.java b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcSpanConfiguration.java new file mode 100644 index 000000000000..9cb95f3a49d1 --- /dev/null +++ b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcSpanConfiguration.java @@ -0,0 +1,113 @@ +/* + * Copyright 2021 NAVER Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.navercorp.pinpoint.collector.grpc.config; + +import com.navercorp.pinpoint.collector.monitor.MonitoringExecutors; +import com.navercorp.pinpoint.collector.receiver.BindAddress; +import com.navercorp.pinpoint.common.server.thread.MonitoringExecutorProperties; +import com.navercorp.pinpoint.common.server.util.CallerUtils; +import com.navercorp.pinpoint.grpc.server.ServerOption; +import org.springframework.beans.factory.FactoryBean; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; +import org.springframework.validation.annotation.Validated; + +import java.util.concurrent.ExecutorService; + + +/** + * @author emeroad + */ +@Configuration +public class GrpcSpanConfiguration { + + public GrpcSpanConfiguration() { + } + + @Bean + @Validated + @ConfigurationProperties("collector.receiver.grpc.span.bindaddress") + public BindAddress.Builder grpcSpanBindAddressBuilder() { + BindAddress.Builder builder = BindAddress.newBuilder(); + builder.setPort(9993); + return builder; + } + + @Bean + @Validated + @ConfigurationProperties("collector.receiver.grpc.span.server.executor") + public MonitoringExecutorProperties grpcSpanServerExecutorProperties() { + return new MonitoringExecutorProperties(); + } + + @Bean + @Validated + @ConfigurationProperties("collector.receiver.grpc.span.server-call.executor") + public MonitoringExecutorProperties grpcSpanServerCallExecutorProperties() { + return new MonitoringExecutorProperties(); + } + + @Bean + @Validated + @ConfigurationProperties("collector.receiver.grpc.span.worker.executor") + public MonitoringExecutorProperties grpcSpanWorkerExecutorProperties() { + return new MonitoringExecutorProperties(); + } + + @Bean + @Validated + @ConfigurationProperties("collector.receiver.grpc.span.stream") + public GrpcStreamProperties grpcSpanStreamProperties() { + return new GrpcStreamProperties(); + } + + @Bean + @ConfigurationProperties("collector.receiver.grpc.span") + public GrpcPropertiesServerOptionBuilder grpcSpanServerOption() { + // Server option + return new GrpcPropertiesServerOptionBuilder(); + } + + @Bean + public GrpcReceiverProperties grpcSpanReceiverProperties(Environment environment) { + + boolean enable = environment.getProperty("collector.receiver.grpc.span.enable", boolean.class, false); + + ServerOption serverOption = grpcSpanServerOption().build(); + + BindAddress bindAddress = grpcSpanBindAddressBuilder().build(); + + return new GrpcReceiverProperties(enable, bindAddress, serverOption); + } + + @Bean + public FactoryBean grpcSpanWorkerExecutor(MonitoringExecutors executors) { + String beanName = CallerUtils.getCallerMethodName(); + MonitoringExecutorProperties properties = grpcSpanWorkerExecutorProperties(); + return executors.newExecutorFactoryBean(properties, beanName); + } + + @Bean + public FactoryBean grpcSpanServerExecutor(MonitoringExecutors executors) { + String beanName = CallerUtils.getCallerMethodName(); + MonitoringExecutorProperties properties = grpcSpanServerExecutorProperties(); + return executors.newExecutorFactoryBean(properties, beanName); + } + +} \ No newline at end of file diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcSpanReceiverConfiguration.java b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcSpanReceiverConfiguration.java index bbce74f838bd..0c4aad68332b 100644 --- a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcSpanReceiverConfiguration.java +++ b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcSpanReceiverConfiguration.java @@ -19,8 +19,6 @@ import com.google.protobuf.GeneratedMessageV3; import com.navercorp.pinpoint.collector.handler.SimpleHandler; import com.navercorp.pinpoint.collector.manage.HandlerManager; -import com.navercorp.pinpoint.collector.monitor.MonitoringExecutors; -import com.navercorp.pinpoint.collector.receiver.BindAddress; import com.navercorp.pinpoint.collector.receiver.DispatchHandler; import com.navercorp.pinpoint.collector.receiver.DispatchHandlerFactoryBean; import com.navercorp.pinpoint.collector.receiver.SpanDispatchHandler; @@ -29,12 +27,9 @@ import com.navercorp.pinpoint.collector.receiver.grpc.service.ServerRequestFactory; import com.navercorp.pinpoint.collector.receiver.grpc.service.SpanService; import com.navercorp.pinpoint.collector.receiver.grpc.service.StreamExecutorServerInterceptorFactory; -import com.navercorp.pinpoint.common.server.thread.MonitoringExecutorProperties; import com.navercorp.pinpoint.common.server.util.AcceptedTimeService; -import com.navercorp.pinpoint.common.server.util.CallerUtils; import com.navercorp.pinpoint.common.server.util.IgnoreAddressFilter; import com.navercorp.pinpoint.grpc.channelz.ChannelzRegistry; -import com.navercorp.pinpoint.grpc.server.ServerOption; import io.grpc.BindableService; import io.grpc.ServerInterceptor; import io.grpc.ServerInterceptors; @@ -42,16 +37,12 @@ import io.grpc.ServerTransportFilter; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.core.env.Environment; import org.springframework.scheduling.concurrent.ScheduledExecutorFactoryBean; -import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.concurrent.Executor; -import java.util.concurrent.ExecutorService; import java.util.concurrent.ScheduledExecutorService; @@ -64,76 +55,6 @@ public class GrpcSpanReceiverConfiguration { public GrpcSpanReceiverConfiguration() { } - @Bean - @Validated - @ConfigurationProperties("collector.receiver.grpc.span.bindaddress") - public BindAddress.Builder grpcSpanBindAddressBuilder() { - BindAddress.Builder builder = BindAddress.newBuilder(); - builder.setPort(9993); - return builder; - } - - @Bean - @Validated - @ConfigurationProperties("collector.receiver.grpc.span.server.executor") - public MonitoringExecutorProperties grpcSpanServerExecutorProperties() { - return new MonitoringExecutorProperties(); - } - - @Bean - @Validated - @ConfigurationProperties("collector.receiver.grpc.span.server-call.executor") - public MonitoringExecutorProperties grpcSpanServerCallExecutorProperties() { - return new MonitoringExecutorProperties(); - } - - @Bean - @Validated - @ConfigurationProperties("collector.receiver.grpc.span.worker.executor") - public MonitoringExecutorProperties grpcSpanWorkerExecutorProperties() { - return new MonitoringExecutorProperties(); - } - - @Bean - @Validated - @ConfigurationProperties("collector.receiver.grpc.span.stream") - public GrpcStreamProperties grpcSpanStreamProperties() { - return new GrpcStreamProperties(); - } - - @Bean - @ConfigurationProperties("collector.receiver.grpc.span") - public GrpcPropertiesServerOptionBuilder grpcSpanServerOption() { - // Server option - return new GrpcPropertiesServerOptionBuilder(); - } - - @Bean - public GrpcReceiverProperties grpcSpanReceiverProperties(Environment environment) { - - boolean enable = environment.getProperty("collector.receiver.grpc.span.enable", boolean.class, false); - - ServerOption serverOption = grpcSpanServerOption().build(); - - BindAddress bindAddress = grpcSpanBindAddressBuilder().build(); - - return new GrpcReceiverProperties(enable, bindAddress, serverOption); - } - - @Bean - public FactoryBean grpcSpanWorkerExecutor(MonitoringExecutors executors) { - String beanName = CallerUtils.getCallerMethodName(); - MonitoringExecutorProperties properties = grpcSpanWorkerExecutorProperties(); - return executors.newExecutorFactoryBean(properties, beanName); - } - - @Bean - public FactoryBean grpcSpanServerExecutor(MonitoringExecutors executors) { - String beanName = CallerUtils.getCallerMethodName(); - MonitoringExecutorProperties properties = grpcSpanServerExecutorProperties(); - return executors.newExecutorFactoryBean(properties, beanName); - } - @Bean public FactoryBean grpcSpanStreamScheduler(@Qualifier("grpcSpanStreamProperties") GrpcStreamProperties properties) { diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcStatConfiguration.java b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcStatConfiguration.java new file mode 100644 index 000000000000..ebd4e26eba13 --- /dev/null +++ b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcStatConfiguration.java @@ -0,0 +1,109 @@ +/* + * Copyright 2021 NAVER Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.navercorp.pinpoint.collector.grpc.config; + +import com.navercorp.pinpoint.collector.monitor.MonitoringExecutors; +import com.navercorp.pinpoint.collector.receiver.BindAddress; +import com.navercorp.pinpoint.common.server.thread.MonitoringExecutorProperties; +import com.navercorp.pinpoint.common.server.util.CallerUtils; +import com.navercorp.pinpoint.grpc.server.ServerOption; +import jakarta.inject.Provider; +import org.springframework.beans.factory.FactoryBean; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; +import org.springframework.validation.annotation.Validated; + +import java.util.concurrent.ExecutorService; + + +/** + * @author emeroad + */ +@Configuration +public class GrpcStatConfiguration { + + public GrpcStatConfiguration() { + } + + @Bean + @Validated + @ConfigurationProperties("collector.receiver.grpc.stat.bindaddress") + public Provider grpcStatBindAddressBuilder() { + BindAddress.Builder builder = BindAddress.newBuilder(); + builder.setPort(9992); + return builder; + } + + @Bean + @Validated + @ConfigurationProperties("collector.receiver.grpc.stat.server.executor") + public MonitoringExecutorProperties grpcStatServerExecutorProperties() { + return new MonitoringExecutorProperties(); + } + + @Bean + @Validated + @ConfigurationProperties("collector.receiver.grpc.stat.worker.executor") + public MonitoringExecutorProperties grpcStatWorkerExecutorProperties() { + return new MonitoringExecutorProperties(); + } + + @Bean + @Validated + @ConfigurationProperties("collector.receiver.grpc.stat.stream") + public GrpcStreamProperties grpcStatStreamProperties() { + return new GrpcStreamProperties(); + } + + @Bean + @ConfigurationProperties("collector.receiver.grpc.stat") + public GrpcPropertiesServerOptionBuilder grpcStatServerOption() { + // Server option + return new GrpcPropertiesServerOptionBuilder(); + } + + + @Bean + public GrpcReceiverProperties grpcStatReceiverProperties( + Environment environment) { + + boolean enable = environment.getProperty("collector.receiver.grpc.stat.enable", boolean.class, false); + + ServerOption serverOption = grpcStatServerOption().build(); + + BindAddress bindAddress = grpcStatBindAddressBuilder().get(); + + return new GrpcReceiverProperties(enable, bindAddress, serverOption); + } + + @Bean + public FactoryBean grpcStatWorkerExecutor(MonitoringExecutors executors) { + String beanName = CallerUtils.getCallerMethodName(); + MonitoringExecutorProperties properties = grpcStatWorkerExecutorProperties(); + return executors.newExecutorFactoryBean(properties, beanName); + } + + @Bean + public FactoryBean grpcStatServerExecutor(MonitoringExecutors executors) { + String beanName = CallerUtils.getCallerMethodName(); + MonitoringExecutorProperties properties = grpcStatServerExecutorProperties(); + return executors.newExecutorFactoryBean(properties, beanName); + } + +} \ No newline at end of file diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcStatReceiverConfiguration.java b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcStatReceiverConfiguration.java index f2c86b7df2e3..b0f5598e576b 100644 --- a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcStatReceiverConfiguration.java +++ b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/config/GrpcStatReceiverConfiguration.java @@ -19,8 +19,6 @@ import com.google.protobuf.GeneratedMessageV3; import com.navercorp.pinpoint.collector.handler.SimpleHandler; import com.navercorp.pinpoint.collector.manage.HandlerManager; -import com.navercorp.pinpoint.collector.monitor.MonitoringExecutors; -import com.navercorp.pinpoint.collector.receiver.BindAddress; import com.navercorp.pinpoint.collector.receiver.DispatchHandler; import com.navercorp.pinpoint.collector.receiver.DispatchHandlerFactoryBean; import com.navercorp.pinpoint.collector.receiver.StatDispatchHandler; @@ -29,30 +27,22 @@ import com.navercorp.pinpoint.collector.receiver.grpc.service.ServerRequestFactory; import com.navercorp.pinpoint.collector.receiver.grpc.service.StatService; import com.navercorp.pinpoint.collector.receiver.grpc.service.StreamExecutorServerInterceptorFactory; -import com.navercorp.pinpoint.common.server.thread.MonitoringExecutorProperties; import com.navercorp.pinpoint.common.server.util.AcceptedTimeService; -import com.navercorp.pinpoint.common.server.util.CallerUtils; import com.navercorp.pinpoint.common.server.util.IgnoreAddressFilter; import com.navercorp.pinpoint.grpc.channelz.ChannelzRegistry; -import com.navercorp.pinpoint.grpc.server.ServerOption; import io.grpc.BindableService; import io.grpc.ServerInterceptor; import io.grpc.ServerInterceptors; import io.grpc.ServerServiceDefinition; import io.grpc.ServerTransportFilter; -import jakarta.inject.Provider; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.core.env.Environment; import org.springframework.scheduling.concurrent.ScheduledExecutorFactoryBean; -import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.concurrent.Executor; -import java.util.concurrent.ExecutorService; import java.util.concurrent.ScheduledExecutorService; @@ -65,72 +55,6 @@ public class GrpcStatReceiverConfiguration { public GrpcStatReceiverConfiguration() { } - @Bean - @Validated - @ConfigurationProperties("collector.receiver.grpc.stat.bindaddress") - public Provider grpcStatBindAddressBuilder() { - BindAddress.Builder builder = BindAddress.newBuilder(); - builder.setPort(9992); - return builder; - } - - @Bean - @Validated - @ConfigurationProperties("collector.receiver.grpc.stat.server.executor") - public MonitoringExecutorProperties grpcStatServerExecutorProperties() { - return new MonitoringExecutorProperties(); - } - - @Bean - @Validated - @ConfigurationProperties("collector.receiver.grpc.stat.worker.executor") - public MonitoringExecutorProperties grpcStatWorkerExecutorProperties() { - return new MonitoringExecutorProperties(); - } - - @Bean - @Validated - @ConfigurationProperties("collector.receiver.grpc.stat.stream") - public GrpcStreamProperties grpcStatStreamProperties() { - return new GrpcStreamProperties(); - } - - @Bean - @ConfigurationProperties("collector.receiver.grpc.stat") - public GrpcPropertiesServerOptionBuilder grpcStatServerOption() { - // Server option - return new GrpcPropertiesServerOptionBuilder(); - } - - - @Bean - public GrpcReceiverProperties grpcStatReceiverProperties( - Environment environment) { - - boolean enable = environment.getProperty("collector.receiver.grpc.stat.enable", boolean.class, false); - - ServerOption serverOption = grpcStatServerOption().build(); - - BindAddress bindAddress = grpcStatBindAddressBuilder().get(); - - return new GrpcReceiverProperties(enable, bindAddress, serverOption); - } - - @Bean - public FactoryBean grpcStatWorkerExecutor(MonitoringExecutors executors) { - String beanName = CallerUtils.getCallerMethodName(); - MonitoringExecutorProperties properties = grpcStatWorkerExecutorProperties(); - return executors.newExecutorFactoryBean(properties, beanName); - } - - @Bean - public FactoryBean grpcStatServerExecutor(MonitoringExecutors executors) { - String beanName = CallerUtils.getCallerMethodName(); - MonitoringExecutorProperties properties = grpcStatServerExecutorProperties(); - return executors.newExecutorFactoryBean(properties, beanName); - } - - @Bean public FactoryBean grpcStatStreamScheduler(@Qualifier("grpcStatStreamProperties") GrpcStreamProperties properties) { diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcAgentDataSslReceiverConfiguration.java b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcAgentSslConfiguration.java similarity index 89% rename from collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcAgentDataSslReceiverConfiguration.java rename to collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcAgentSslConfiguration.java index fd3eb44ad3fc..f0bd0a7ba9e4 100644 --- a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcAgentDataSslReceiverConfiguration.java +++ b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcAgentSslConfiguration.java @@ -27,13 +27,13 @@ * @author Taejin Koo */ @Configuration -public class GrpcAgentDataSslReceiverConfiguration { +public class GrpcAgentSslConfiguration { public static final String BIND_ADDRESS = "collector.receiver.grpc.agent.ssl.bindaddress"; public static final String SSL = "collector.receiver.grpc.ssl"; - public GrpcAgentDataSslReceiverConfiguration() { + public GrpcAgentSslConfiguration() { } @Bean(BIND_ADDRESS) @@ -53,7 +53,7 @@ public GrpcSslProperties.Builder newGrpcSslConfigurationBuilder() { @Bean public GrpcSslReceiverProperties grpcAgentSslReceiverProperties( - @Qualifier(GrpcAgentDataSslReceiverConfiguration.SSL) GrpcSslProperties.Builder sslPropertiesBuilder) { + @Qualifier(GrpcAgentSslConfiguration.SSL) GrpcSslProperties.Builder sslPropertiesBuilder) { BindAddress bindAddress = newBindAddressBuilder().build(); diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcSpanSslReceiverConfiguration.java b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcSpanSslConfiguration.java similarity index 89% rename from collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcSpanSslReceiverConfiguration.java rename to collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcSpanSslConfiguration.java index e6317353c43d..bcdc9e95da92 100644 --- a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcSpanSslReceiverConfiguration.java +++ b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcSpanSslConfiguration.java @@ -27,11 +27,11 @@ * @author Taejin Koo */ @Configuration -public class GrpcSpanSslReceiverConfiguration { +public class GrpcSpanSslConfiguration { public static final String BIND_ADDRESS = "collector.receiver.grpc.span.ssl.bindaddress"; - public GrpcSpanSslReceiverConfiguration() { + public GrpcSpanSslConfiguration() { } @Bean(BIND_ADDRESS) @@ -45,7 +45,7 @@ public BindAddress.Builder newBindAddressBuilder() { @Bean public GrpcSslReceiverProperties grpcSpanSslReceiverProperties( - @Qualifier(GrpcAgentDataSslReceiverConfiguration.SSL) GrpcSslProperties.Builder sslPropertiesBuilder) { + @Qualifier(GrpcAgentSslConfiguration.SSL) GrpcSslProperties.Builder sslPropertiesBuilder) { BindAddress bindAddress = newBindAddressBuilder().build(); diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcStatSslReceiverConfiguration.java b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcStatSslConfiguration.java similarity index 88% rename from collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcStatSslReceiverConfiguration.java rename to collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcStatSslConfiguration.java index 7d913841e839..156342b488e5 100644 --- a/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcStatSslReceiverConfiguration.java +++ b/collector/src/main/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcStatSslConfiguration.java @@ -27,11 +27,11 @@ * @author Taejin Koo */ @Configuration -public class GrpcStatSslReceiverConfiguration { +public class GrpcStatSslConfiguration { public static final String BIND_ADDRESS = "collector.receiver.grpc.stat.ssl.bindaddress"; - public GrpcStatSslReceiverConfiguration() { + public GrpcStatSslConfiguration() { } @Bean(BIND_ADDRESS) @@ -45,7 +45,7 @@ public BindAddress.Builder newBindAddressBuilder() { @Bean public GrpcSslReceiverProperties grpcStatSslReceiverProperties( - @Qualifier(GrpcAgentDataSslReceiverConfiguration.SSL) GrpcSslProperties.Builder sslPropertiesBuilder) throws Exception{ + @Qualifier(GrpcAgentSslConfiguration.SSL) GrpcSslProperties.Builder sslPropertiesBuilder) throws Exception{ BindAddress bindAddress = newBindAddressBuilder().build(); diff --git a/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentDataReceiverConfigurationTest.java b/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentConfigurationTest.java similarity index 75% rename from collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentDataReceiverConfigurationTest.java rename to collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentConfigurationTest.java index 42c860032a46..62b2efc8f658 100644 --- a/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentDataReceiverConfigurationTest.java +++ b/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcAgentConfigurationTest.java @@ -16,26 +16,14 @@ package com.navercorp.pinpoint.collector.grpc.config; -import com.google.protobuf.GeneratedMessageV3; -import com.navercorp.pinpoint.collector.config.CollectorCommonConfiguration; -import com.navercorp.pinpoint.collector.handler.SimpleAndRequestResponseHandler; import com.navercorp.pinpoint.collector.receiver.BindAddress; -import com.navercorp.pinpoint.collector.receiver.grpc.ServerInterceptorFactory; -import com.navercorp.pinpoint.collector.receiver.grpc.service.AgentService; -import com.navercorp.pinpoint.collector.receiver.grpc.service.MetadataService; -import com.navercorp.pinpoint.collector.service.AgentInfoService; -import com.navercorp.pinpoint.collector.service.async.AgentEventAsyncTaskService; -import com.navercorp.pinpoint.collector.service.async.AgentLifeCycleAsyncTaskService; import com.navercorp.pinpoint.common.server.thread.MonitoringExecutorProperties; -import com.navercorp.pinpoint.common.server.util.AcceptedTimeService; import com.navercorp.pinpoint.grpc.server.ServerOption; -import com.navercorp.pinpoint.realtime.collector.receiver.EmptyCommandService; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -74,14 +62,11 @@ "collector.receiver.grpc.agent.receive_buffer_size=1MB", }) @ContextConfiguration(classes = { - GrpcAgentDataReceiverConfiguration.class, - GrpcComponentConfiguration.class, - CollectorCommonConfiguration.class, - ServerInterceptorFactory.class, + GrpcAgentReceiverConfiguration.class, TestReceiverConfig.class, }) @ExtendWith(SpringExtension.class) -public class GrpcAgentDataReceiverConfigurationTest { +public class GrpcAgentConfigurationTest { @Autowired GrpcReceiverProperties properties; @@ -96,26 +81,6 @@ public class GrpcAgentDataReceiverConfigurationTest { @Qualifier("grpcAgentWorkerExecutorProperties") MonitoringExecutorProperties workerExecutor; - @MockBean(name = "grpcAgentInfoHandler") - SimpleAndRequestResponseHandler agentInfoHandler; - - @MockBean - AcceptedTimeService acceptedTimeService; - @MockBean - AgentEventAsyncTaskService agentEventAsyncTaskService; - @MockBean - AgentLifeCycleAsyncTaskService agentLifeCycleAsyncTaskService; - @MockBean - AgentInfoService agentInfoService; - - @MockBean(name = "commandService") - EmptyCommandService commandService; - @MockBean - AgentService agentService; - @MockBean - MetadataService metadataService; - - @Test public void properties() { diff --git a/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcSpanReceiverConfigurationTest.java b/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcSpanConfigurationTest.java similarity index 87% rename from collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcSpanReceiverConfigurationTest.java rename to collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcSpanConfigurationTest.java index f0bc1909e93c..161067f6839a 100644 --- a/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcSpanReceiverConfigurationTest.java +++ b/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcSpanConfigurationTest.java @@ -16,12 +16,8 @@ package com.navercorp.pinpoint.collector.grpc.config; -import com.google.protobuf.GeneratedMessageV3; -import com.navercorp.pinpoint.collector.config.CollectorCommonConfiguration; -import com.navercorp.pinpoint.collector.handler.SimpleHandler; import com.navercorp.pinpoint.collector.receiver.BindAddress; import com.navercorp.pinpoint.common.server.thread.MonitoringExecutorProperties; -import com.navercorp.pinpoint.common.server.util.AcceptedTimeService; import com.navercorp.pinpoint.grpc.server.ServerOption; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -30,7 +26,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -74,13 +69,11 @@ "collector.receiver.grpc.span.receive_buffer_size=3MB", }) @ContextConfiguration(classes = { - GrpcSpanReceiverConfiguration.class, - GrpcComponentConfiguration.class, - CollectorCommonConfiguration.class, + GrpcSpanConfiguration.class, TestReceiverConfig.class, }) @ExtendWith(SpringExtension.class) -public class GrpcSpanReceiverConfigurationTest { +public class GrpcSpanConfigurationTest { private final Logger logger = LogManager.getLogger(this.getClass()); @Autowired @@ -92,15 +85,6 @@ public class GrpcSpanReceiverConfigurationTest { @Qualifier("grpcSpanWorkerExecutorProperties") MonitoringExecutorProperties workerExecutor; - @MockBean(name = "grpcSpanHandler") - SimpleHandler spanHandler; - - @MockBean(name = "grpcSpanChunkHandler") - SimpleHandler spanChunkHandler; - - @MockBean - AcceptedTimeService acceptedTimeService; - @Test public void properties() { diff --git a/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcStatReceiverConfigurationTest.java b/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcStatConfigurationTest.java similarity index 87% rename from collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcStatReceiverConfigurationTest.java rename to collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcStatConfigurationTest.java index c6b510545141..f83111faab9e 100644 --- a/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcStatReceiverConfigurationTest.java +++ b/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/config/GrpcStatConfigurationTest.java @@ -16,19 +16,14 @@ package com.navercorp.pinpoint.collector.grpc.config; -import com.google.protobuf.GeneratedMessageV3; -import com.navercorp.pinpoint.collector.config.CollectorCommonConfiguration; -import com.navercorp.pinpoint.collector.handler.SimpleHandler; import com.navercorp.pinpoint.collector.receiver.BindAddress; import com.navercorp.pinpoint.common.server.thread.MonitoringExecutorProperties; -import com.navercorp.pinpoint.common.server.util.AcceptedTimeService; import com.navercorp.pinpoint.grpc.server.ServerOption; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -69,13 +64,11 @@ "collector.receiver.grpc.stat.receive_buffer_size=2MB", }) @ContextConfiguration(classes = { - GrpcStatReceiverConfiguration.class, - GrpcComponentConfiguration.class, - CollectorCommonConfiguration.class, + GrpcStatConfiguration.class, TestReceiverConfig.class }) @ExtendWith(SpringExtension.class) -public class GrpcStatReceiverConfigurationTest { +public class GrpcStatConfigurationTest { @Autowired GrpcReceiverProperties properties; @@ -86,13 +79,6 @@ public class GrpcStatReceiverConfigurationTest { @Qualifier("grpcStatWorkerExecutorProperties") MonitoringExecutorProperties workerExecutor; - @MockBean(name = "grpcAgentStatHandlerV2") - SimpleHandler statHandlerV2; - @MockBean(name = "grpcAgentEventHandler") - SimpleHandler statHandler; - @MockBean - AcceptedTimeService acceptedTimeService; - @Test public void properties() { diff --git a/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcAgentDataSslReceiverConfigurationTest.java b/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcAgentSslConfigurationTest.java similarity index 96% rename from collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcAgentDataSslReceiverConfigurationTest.java rename to collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcAgentSslConfigurationTest.java index 64756a70ccd6..9c74bf3fd522 100644 --- a/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcAgentDataSslReceiverConfigurationTest.java +++ b/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcAgentSslConfigurationTest.java @@ -46,10 +46,10 @@ "collector.receiver.grpc.ssl.key_cert_file_path=certs/server0.key" }) @ContextConfiguration(classes = { - GrpcAgentDataSslReceiverConfiguration.class + GrpcAgentSslConfiguration.class }) @ExtendWith(SpringExtension.class) -public class GrpcAgentDataSslReceiverConfigurationTest { +public class GrpcAgentSslConfigurationTest { @Autowired GrpcSslReceiverProperties configuration; diff --git a/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcSpanSslReceiverConfigurationTest.java b/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcSpanSslConfigurationTest.java similarity index 95% rename from collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcSpanSslReceiverConfigurationTest.java rename to collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcSpanSslConfigurationTest.java index 1ad610f585f4..dfe4cdb090c9 100644 --- a/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcSpanSslReceiverConfigurationTest.java +++ b/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcSpanSslConfigurationTest.java @@ -47,11 +47,11 @@ "collector.receiver.grpc.ssl.key_cert_file_path=certs/server0.key" }) @ContextConfiguration(classes = { - GrpcAgentDataSslReceiverConfiguration.class, - GrpcSpanSslReceiverConfiguration.class + GrpcAgentSslConfiguration.class, + GrpcSpanSslConfiguration.class }) @ExtendWith(SpringExtension.class) -public class GrpcSpanSslReceiverConfigurationTest { +public class GrpcSpanSslConfigurationTest { @Autowired @Qualifier("grpcSpanSslReceiverProperties") diff --git a/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcStatSslReceiverConfigurationTest.java b/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcStatSslConfigurationTest.java similarity index 95% rename from collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcStatSslReceiverConfigurationTest.java rename to collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcStatSslConfigurationTest.java index 2c4928f3bea7..7d4413b46222 100644 --- a/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcStatSslReceiverConfigurationTest.java +++ b/collector/src/test/java/com/navercorp/pinpoint/collector/grpc/ssl/GrpcStatSslConfigurationTest.java @@ -47,11 +47,11 @@ "collector.receiver.grpc.ssl.key_cert_file_path=certs/server0.key" }) @ContextConfiguration(classes = { - GrpcAgentDataSslReceiverConfiguration.class, - GrpcStatSslReceiverConfiguration.class + GrpcAgentSslConfiguration.class, + GrpcStatSslConfiguration.class }) @ExtendWith(SpringExtension.class) -public class GrpcStatSslReceiverConfigurationTest { +public class GrpcStatSslConfigurationTest { @Autowired @Qualifier("grpcStatSslReceiverProperties")