membphis opened a new issue #4091:
URL: https://github.com/apache/apisix/issues/4091


   we have stored the upstream ip/port in `ctx` object, here is the link: 
https://github.com/apache/apisix/blob/master/apisix/balancer.lua#L204-L205
   
   we should support to fetch from `ctx.vars`, here is the example:
   
   ```lua
   local up_ip = ctx.vars["balancer_ip"]
   local up_port = ctx.vars["balancer_port"]
   ```
   
   Then we can use this value in plugins(eg: SkyWalking).
   
   I think we can use the same way as "consumer_name", which is the code link:
   
   https://github.com/apache/apisix/blob/master/apisix/core/ctx.lua#L176


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


Reply via email to