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 2020/08/18 12:34:08 UTC

[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #5348: support http header tag

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



##########
File path: apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/SpringMVCPluginConfig.java
##########
@@ -35,16 +37,35 @@
              * request.
              */
             public static boolean COLLECT_HTTP_PARAMS = false;
+
+            /**
+             * This config item controls that whether the SpringMVC plugin should collect the headers of the
+             * request.
+             */
+            public static boolean COLLECT_HTTP_HEADERS = false;
         }
 
         @PluginConfig(root = SpringMVCPluginConfig.class)
         public static class Http {
             /**
              * When either {@link Plugin.SpringMVC#COLLECT_HTTP_PARAMS} is enabled, how many characters to keep and send
              * to the OAP backend, use negative values to keep and send the complete parameters, NB. this config item is
-             * added for the sake of performance
+             * add for the sake of performance

Review comment:
       Why modify this

##########
File path: apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/SpringMVCPluginConfig.java
##########
@@ -35,16 +37,35 @@
              * request.
              */
             public static boolean COLLECT_HTTP_PARAMS = false;
+
+            /**
+             * This config item controls that whether the SpringMVC plugin should collect the headers of the
+             * request.
+             */
+            public static boolean COLLECT_HTTP_HEADERS = false;
         }
 
         @PluginConfig(root = SpringMVCPluginConfig.class)
         public static class Http {
             /**
              * When either {@link Plugin.SpringMVC#COLLECT_HTTP_PARAMS} is enabled, how many characters to keep and send
              * to the OAP backend, use negative values to keep and send the complete parameters, NB. this config item is
-             * added for the sake of performance
+             * add for the sake of performance
              */
             public static int HTTP_PARAMS_LENGTH_THRESHOLD = 1024;
+
+            /**
+             * When either {@link Plugin.SpringMVC#COLLECT_HTTP_HEADERS} is enabled, how many characters to keep and send
+             * to the OAP backend, use negative values to keep and send the complete headers, NB. this config item is
+             * add for the sake of performance

Review comment:
       ```suggestion
                * added for the sake of performance
   ```

##########
File path: apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/SpringMVCPluginConfig.java
##########
@@ -35,16 +37,35 @@
              * request.
              */
             public static boolean COLLECT_HTTP_PARAMS = false;
+
+            /**
+             * This config item controls that whether the SpringMVC plugin should collect the headers of the
+             * request.
+             */
+            public static boolean COLLECT_HTTP_HEADERS = false;
         }
 
         @PluginConfig(root = SpringMVCPluginConfig.class)
         public static class Http {
             /**
              * When either {@link Plugin.SpringMVC#COLLECT_HTTP_PARAMS} is enabled, how many characters to keep and send
              * to the OAP backend, use negative values to keep and send the complete parameters, NB. this config item is
-             * added for the sake of performance
+             * add for the sake of performance
              */
             public static int HTTP_PARAMS_LENGTH_THRESHOLD = 1024;
+
+            /**
+             * When either {@link Plugin.SpringMVC#COLLECT_HTTP_HEADERS} is enabled, how many characters to keep and send
+             * to the OAP backend, use negative values to keep and send the complete headers, NB. this config item is
+             * add for the sake of performance
+             */
+            public static int HTTP_HEADERS_LENGTH_THRESHOLD = 2048;
+
+            /**
+             * When either {@link Plugin.SpringMVC#COLLECT_HTTP_HEADERS} is enabled, control what header data should be
+             * collect, this is for security purpose, values must be lowed case
+             */

Review comment:
       ```suggestion
               /**
                * When {@link Plugin.SpringMVC#COLLECT_HTTP_HEADERS} is enabled, it controls what header data should be
                * collected, this is for security purpose, values must be lower case
                */
   ```




----------------------------------------------------------------
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