membphis commented on a change in pull request #1386: enhance: plugin Zipkin 
add service name and report local server IP
URL: https://github.com/apache/incubator-apisix/pull/1386#discussion_r402056789
 
 

 ##########
 File path: apisix/plugins/zipkin.lua
 ##########
 @@ -44,6 +55,11 @@ local _M = {
 
 
 function _M.check_schema(conf)
+
+    if not conf.server_addr or conf.server_addr == '' then
+        conf.server_addr = ngx.var.server_addr
 
 Review comment:
   I think it is wrong too. 
   
   we need to update this line:
   
   
https://github.com/apache/incubator-apisix/blob/e36a21e187dd2016f49c93dca326cb4f6d17c928/apisix/plugins/zipkin.lua#L99
   
   ```lua
   -- generate different tracers for different "server_addr" values
   
   local tracer = core.lrucache.plugin_ctx(plugin_name .. "#" .. 
ctx.var["server_addr"], ctx,
                                               create_tracer, conf)
   ```

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to