This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch 6.0
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git


The following commit(s) were added to refs/heads/6.0 by this push:
     new 451fcad  Add a debug log judge.
451fcad is described below

commit 451fcadd0bcfd72196878a9ee01cecf8c92dc807
Author: Wu Sheng <[email protected]>
AuthorDate: Wed Aug 15 23:00:20 2018 +0800

    Add a debug log judge.
---
 .../istio/telemetry/provider/IstioTelemetryGRPCHandler.java       | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/oap-server/server-receiver-plugin/skywalking-istio-telemetry-receiver-plugin/istio-telemetry-receiver-provider/src/main/java/org/apache/skywalking/oap/server/receiver/istio/telemetry/provider/IstioTelemetryGRPCHandler.java
 
b/oap-server/server-receiver-plugin/skywalking-istio-telemetry-receiver-plugin/istio-telemetry-receiver-provider/src/main/java/org/apache/skywalking/oap/server/receiver/istio/telemetry/provider/IstioTelemetryGRPCHandler.java
index cb372c5..f7d56bd 100644
--- 
a/oap-server/server-receiver-plugin/skywalking-istio-telemetry-receiver-plugin/istio-telemetry-receiver-provider/src/main/java/org/apache/skywalking/oap/server/receiver/istio/telemetry/provider/IstioTelemetryGRPCHandler.java
+++ 
b/oap-server/server-receiver-plugin/skywalking-istio-telemetry-receiver-plugin/istio-telemetry-receiver-provider/src/main/java/org/apache/skywalking/oap/server/receiver/istio/telemetry/provider/IstioTelemetryGRPCHandler.java
@@ -44,11 +44,13 @@ public class IstioTelemetryGRPCHandler extends 
HandleMetricServiceGrpc.HandleMet
 
     @Override public void handleMetric(IstioMetricProto.HandleMetricRequest 
request,
         StreamObserver<ReportProto.ReportResult> responseObserver) {
-        for (IstioMetricProto.InstanceMsg i : request.getInstancesList()) {
+        if (logger.isDebugEnabled()) {
             logger.debug("Received msg {}", request);
+        }
+        for (IstioMetricProto.InstanceMsg i : request.getInstancesList()) {
             String requestMethod = string(i, "requestMethod");
-            String requestPath = string(i,"requestPath");
-            String requestScheme = string(i,"requestScheme");
+            String requestPath = string(i, "requestPath");
+            String requestScheme = string(i, "requestScheme");
             long responseCode = int64(i, "responseCode");
             String reporter = string(i, "reporter");
             String protocol = string(i, "apiProtocol");

Reply via email to