WillemJiang commented on a change in pull request #555: [SCB-327] Update 
metrics publish data module (Re-organized)
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/555#discussion_r170404621
 
 

 ##########
 File path: 
demo/perf/src/main/java/org/apache/servicecomb/demo/perf/PerfMetricsFilePublisher.java
 ##########
 @@ -75,51 +70,57 @@ private void collectVertxMetrics(MetricsLoader loader, 
StringBuilder sb) {
   }
 
   private void collectMetrics(MetricsLoader loader, StringBuilder sb) {
-    MetricNode treeNode = loader
-        .getMetricTree(MetricsConst.SERVICECOMB_INVOCATION, 
MetricsConst.TAG_ROLE, MetricsConst.TAG_OPERATION,
-            MetricsConst.TAG_STATUS);
+    MetricNode treeNode;
+    try {
+      treeNode = loader
+          .getMetricTree(MetricsConst.SERVICECOMB_INVOCATION, 
MetricsConst.TAG_ROLE, MetricsConst.TAG_OPERATION,
+              MetricsConst.TAG_STATUS);
+    }
+    //before receive any request,there are no 
MetricsConst.SERVICECOMB_INVOCATION,so getMetricTree will throw 
ServiceCombException
+    catch (ServiceCombException ignored) {
+      return;
 
 Review comment:
   We need to log the exception for trace the issue

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to