You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by mo...@apache.org on 2023/08/31 15:30:09 UTC

[knox] branch master updated: Uniform http method of client metric to lowerCase (#789)

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

more pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new 69a1a7164 Uniform http method of client metric to lowerCase (#789)
69a1a7164 is described below

commit 69a1a71644e5740c82e8ef45de250229945d2340
Author: Liang Feng <51...@qq.com>
AuthorDate: Thu Aug 31 23:30:04 2023 +0800

    Uniform http method of client metric to lowerCase (#789)
---
 .../gateway/services/metrics/impl/instr/InstrumentedGatewayFilter.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gateway-server/src/main/java/org/apache/knox/gateway/services/metrics/impl/instr/InstrumentedGatewayFilter.java b/gateway-server/src/main/java/org/apache/knox/gateway/services/metrics/impl/instr/InstrumentedGatewayFilter.java
index e346bf8a2..70f6c4c9a 100644
--- a/gateway-server/src/main/java/org/apache/knox/gateway/services/metrics/impl/instr/InstrumentedGatewayFilter.java
+++ b/gateway-server/src/main/java/org/apache/knox/gateway/services/metrics/impl/instr/InstrumentedGatewayFilter.java
@@ -30,6 +30,7 @@ import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import java.io.IOException;
 import java.net.URISyntaxException;
+import java.util.Locale;
 import java.util.Map;
 
 public class InstrumentedGatewayFilter extends GatewayFilter {
@@ -91,7 +92,7 @@ public class InstrumentedGatewayFilter extends GatewayFilter {
       HttpServletRequest httpServletRequest = (HttpServletRequest) request;
       builder.append(InstrUtils.getResourcePath(httpServletRequest.getPathInfo()));
       builder.append('.');
-      builder.append(httpServletRequest.getMethod());
+      builder.append(httpServletRequest.getMethod().toLowerCase(Locale.ROOT));
       builder.append("-requests");
     }
     return metricRegistry.timer(builder.toString());