You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by GitBox <gi...@apache.org> on 2023/01/05 14:06:27 UTC

[GitHub] [linkis] aiceflower opened a new pull request, #4100: [feat:4099] gateway log ip info

aiceflower opened a new pull request, #4100:
URL: https://github.com/apache/linkis/pull/4100

   gateway print ip log info https://github.com/apache/linkis/issues/4099


-- 
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: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [linkis] aiceflower commented on a diff in pull request #4100: [feat:4099] gateway log ip info

Posted by "aiceflower (via GitHub)" <gi...@apache.org>.
aiceflower commented on code in PR #4100:
URL: https://github.com/apache/linkis/pull/4100#discussion_r1089879126


##########
linkis-spring-cloud-services/linkis-service-gateway/linkis-spring-cloud-gateway/src/main/java/org/apache/linkis/gateway/springcloud/http/GatewayAuthorizationFilter.java:
##########
@@ -159,10 +159,14 @@ private Mono<Void> gatewayDeal(
     ServiceInstance serviceInstance;
     try {
       parser.parse(gatewayContext);
+      logger.info("client request uri: " + gatewayContext.getRequest().getRequestURI());
       if (gatewayHttpResponse.isCommitted()) {
         return gatewayHttpResponse.getResponseMono();
       }
       serviceInstance = router.route(gatewayContext);
+      if (serviceInstance != null) {
+        logger.info("route uri: " + serviceInstance.getInstance());
+      }

Review Comment:
   I put the internal log on the outer layer so that it is easy to locate the problem in multiple threads.



-- 
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: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [linkis] peacewong merged pull request #4100: [feat:4099] gateway log ip info

Posted by "peacewong (via GitHub)" <gi...@apache.org>.
peacewong merged PR #4100:
URL: https://github.com/apache/linkis/pull/4100


-- 
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: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [linkis] guoshupei commented on a diff in pull request #4100: [feat:4099] gateway log ip info

Posted by GitBox <gi...@apache.org>.
guoshupei commented on code in PR #4100:
URL: https://github.com/apache/linkis/pull/4100#discussion_r1063085310


##########
linkis-spring-cloud-services/linkis-service-gateway/linkis-spring-cloud-gateway/src/main/java/org/apache/linkis/gateway/springcloud/http/GatewayAuthorizationFilter.java:
##########
@@ -159,10 +159,14 @@ private Mono<Void> gatewayDeal(
     ServiceInstance serviceInstance;
     try {
       parser.parse(gatewayContext);
+      logger.info("client request uri: " + gatewayContext.getRequest().getRequestURI());
       if (gatewayHttpResponse.isCommitted()) {
         return gatewayHttpResponse.getResponseMono();
       }
       serviceInstance = router.route(gatewayContext);
+      if (serviceInstance != null) {
+        logger.info("route uri: " + serviceInstance.getInstance());
+      }

Review Comment:
   The route method is already printed and contains more information, I think it can be removed



##########
linkis-spring-cloud-services/linkis-service-gateway/linkis-spring-cloud-gateway/src/main/java/org/apache/linkis/gateway/springcloud/http/GatewayAuthorizationFilter.java:
##########
@@ -159,10 +159,14 @@ private Mono<Void> gatewayDeal(
     ServiceInstance serviceInstance;
     try {
       parser.parse(gatewayContext);
+      logger.info("client request uri: " + gatewayContext.getRequest().getRequestURI());

Review Comment:
   If you want to know the requestURI, I think it would be better to add it at the beginning of GatewayAuthorizationFilter.
   Whether the level can be changed to debug?



-- 
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: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org