ruanweihong-aaa commented on PR #13946:
URL: https://github.com/apache/apisix/pull/13946#issuecomment-6359965526

   This reads the NGINX upstream timing:
   ```lua
   local response_time = 
tonumber(get_upstream_token(ngx_var.upstream_response_time, idx))
   ```
   But `ext-plugin-post-resp` records its timing in 
`ctx.var.upstream_response_time`.
   
   I tested this with the real Go runner: a 200ms delay in a preceding 
`before_proxy` plugin plus a 400ms upstream response produced a CLIENT span of 
about 603ms, so the pre-dispatch delay was included. Could we account for the 
ext-plugin timing source and add a regression test?
   
   Source: [timing 
read](https://github.com/apache/apisix/blob/75e4057eeec5a6c05f904cebdea125685e2ce4c8/apisix/plugins/opentelemetry.lua#L547-L549)
 ยท [ext-plugin timing 
write](https://github.com/apache/apisix/blob/75e4057eeec5a6c05f904cebdea125685e2ce4c8/apisix/plugins/ext-plugin-post-resp.lua#L172)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to