mateczagany commented on code in PR #863: URL: https://github.com/apache/flink-kubernetes-operator/pull/863#discussion_r1716694875
########## flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/metrics/KubernetesClientMetrics.java: ########## @@ -118,32 +139,91 @@ public KubernetesClientMetrics( createMeterViewForMetricsGroup( responseMetricGroup.addGroup(HTTP_RESPONSE_5XX))); } + this.requestStartTimes = new ConcurrentHashMap<>(); } @Override - public Response intercept(Chain chain) throws IOException { - Request request = chain.request(); - updateRequestMetrics(request); - Response response = null; - final long startTime = System.nanoTime(); - try { - response = chain.proceed(request); - return response; - } finally { - updateResponseMetrics(response, startTime); + public AsyncBody.Consumer<List<ByteBuffer>> consumer( Review Comment: The `consumer` method is not called when building websockets, thus the new implementation outputting different request count than before originally. I think we could use `before` instead since we don't modify the consumer here anyways. That one will be called for websockets as well. https://github.com/fabric8io/kubernetes-client/blob/37ee45b94659879718fae7e9b77c2357a9e10c28/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/http/StandardHttpClient.java#L264 -- 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. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org