You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/01/04 12:40:01 UTC

[GitHub] [apisix] jagerzhang opened a new pull request #6008: feat: supports to logging apisix_latency and upstream_latency

jagerzhang opened a new pull request #6008:
URL: https://github.com/apache/apisix/pull/6008


   ### What this PR does / why we need it:
   supports to logging apisix_latency and upstream_latency: https://github.com/apache/apisix/issues/5910
   
   ### Pre-submission checklist:
   The original code is used directly without adding other new logic.
   


-- 
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@apisix.apache.org

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



[GitHub] [apisix] spacewander commented on a change in pull request #6008: feat: supports to logging apisix_latency and upstream_latency

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #6008:
URL: https://github.com/apache/apisix/pull/6008#discussion_r778487393



##########
File path: apisix/utils/log-util.lua
##########
@@ -120,7 +122,9 @@ local function get_full_log(ngx, conf)
         consumer = consumer,
         client_ip = core.request.get_remote_client_ip(ngx.ctx.api_ctx),
         start_time = ngx.req.start_time() * 1000,
-        latency = (ngx_now() - ngx.req.start_time()) * 1000
+        latency = latency,
+        upstream_latency = upstream_latency,

Review comment:
       I think we should discuss it in the mail list first when adding a new field to the full log format.
   
   Is it commonly required? Or it is just used in some companies?




-- 
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@apisix.apache.org

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



[GitHub] [apisix] jagerzhang commented on a change in pull request #6008: feat: supports to logging apisix_latency and upstream_latency

Posted by GitBox <gi...@apache.org>.
jagerzhang commented on a change in pull request #6008:
URL: https://github.com/apache/apisix/pull/6008#discussion_r778494264



##########
File path: apisix/utils/log-util.lua
##########
@@ -120,7 +122,9 @@ local function get_full_log(ngx, conf)
         consumer = consumer,
         client_ip = core.request.get_remote_client_ip(ngx.ctx.api_ctx),
         start_time = ngx.req.start_time() * 1000,
-        latency = (ngx_now() - ngx.req.start_time()) * 1000
+        latency = latency,
+        upstream_latency = upstream_latency,

Review comment:
       ok, I'll continue to activate the previous discussion.




-- 
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@apisix.apache.org

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



[GitHub] [apisix] jagerzhang closed pull request #6008: feat: supports to logging apisix_latency and upstream_latency

Posted by GitBox <gi...@apache.org>.
jagerzhang closed pull request #6008:
URL: https://github.com/apache/apisix/pull/6008


   


-- 
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@apisix.apache.org

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



[GitHub] [apisix] jagerzhang closed pull request #6008: feat: supports to logging apisix_latency and upstream_latency

Posted by GitBox <gi...@apache.org>.
jagerzhang closed pull request #6008:
URL: https://github.com/apache/apisix/pull/6008


   


-- 
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@apisix.apache.org

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