You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/10/24 02:25:43 UTC

[GitHub] [pulsar] Technoboy- commented on a diff in pull request #18166: [improve] Split clientAppId() usage for better client request log.

Technoboy- commented on code in PR #18166:
URL: https://github.com/apache/pulsar/pull/18166#discussion_r1002830237


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java:
##########
@@ -133,6 +133,11 @@ public static String splitPath(String source, int slice) {
      * @return the web service caller identification
      */
     public String clientAppId() {
+        return "clientIP=" + httpRequest.getRemoteAddr() +
+                "clientRole=" + httpRequest.getAttribute(AuthenticationFilter.AuthenticatedRoleAttributeName);
+    }
+
+    public String clientRole() {

Review Comment:
   It's better to change here, only changing the implementation of `clientAppId`. Then no need to replace the `clientRole` somewhere.



-- 
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: commits-unsubscribe@pulsar.apache.org

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