You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/06/09 15:09:00 UTC

[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #7091: Use MAL to calculate JVM metrics, remove OAL dependency.

kezhenxu94 commented on a change in pull request #7091:
URL: https://github.com/apache/skywalking/pull/7091#discussion_r648406192



##########
File path: oap-server/server-receiver-plugin/skywalking-jvm-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/jvm/provider/handler/JVMMetricReportServiceHandler.java
##########
@@ -23,31 +23,35 @@
 import org.apache.skywalking.apm.network.common.v3.Commands;
 import org.apache.skywalking.apm.network.language.agent.v3.JVMMetricCollection;
 import org.apache.skywalking.apm.network.language.agent.v3.JVMMetricReportServiceGrpc;
+import org.apache.skywalking.oap.meter.analyzer.prometheus.rule.Rule;
 import org.apache.skywalking.oap.server.analyzer.provider.jvm.JVMSourceDispatcher;
 import org.apache.skywalking.oap.server.core.CoreModule;
 import org.apache.skywalking.oap.server.core.config.NamingControl;
 import org.apache.skywalking.oap.server.library.module.ModuleManager;
 import org.apache.skywalking.oap.server.library.server.grpc.GRPCHandler;
 
+import java.util.List;
+
 @Slf4j
 public class JVMMetricReportServiceHandler extends JVMMetricReportServiceGrpc.JVMMetricReportServiceImplBase implements GRPCHandler {
-    private final JVMSourceDispatcher jvmSourceDispatcher;
     private final NamingControl namingControl;
 
-    public JVMMetricReportServiceHandler(ModuleManager moduleManager) {
-        this.jvmSourceDispatcher = new JVMSourceDispatcher(moduleManager);
+    private final JVMSourceDispatcher jvmSourceDispatcher;
+
+    public JVMMetricReportServiceHandler(ModuleManager moduleManager, List<Rule> rules) {
+        this.jvmSourceDispatcher = new JVMSourceDispatcher(moduleManager, rules);
         this.namingControl = moduleManager.find(CoreModule.NAME)
-                                          .provider()
-                                          .getService(NamingControl.class);
+                .provider()
+                .getService(NamingControl.class);

Review comment:
       Please import our code style rules, these lines are not expected to be changed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org