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 2020/04/03 06:27:10 UTC

[GitHub] [incubator-apisix] moonming commented on a change in pull request #1386: enhance: plugin Zipkin add service name and report local server IP

moonming 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_r402761155
 
 

 ##########
 File path: t/lib/server.lua
 ##########
 @@ -115,6 +115,23 @@ function _M.mock_zipkin()
         if not span.traceId then
             ngx.exit(400)
         end
+
+        if not span.localEndpoint then
+            ngx.exit(403)
+        end
+
+        if span.localEndpoint.serviceName ~= 'APISIX' and span.localEndpoint.serviceName ~= 'apisix' then
+            ngx.exit(404)
+        end
+
+        if span.localEndpoint.port ~= 1984 then
+            ngx.exit(404)
+        end
+
+        if span.localEndpoint.ipv4 ~= ngx.req.get_uri_args()['server_addr'] then
+            ngx.exit(404)
 
 Review comment:
   ditto

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services