wu-sheng commented on a change in pull request #42: URL: https://github.com/apache/skywalking-nginx-lua/pull/42#discussion_r495518659
########## File path: lib/skywalking/tracer.lua ########## @@ -68,6 +68,10 @@ end function Tracer:finish() -- Finish the exit span when received the first response package from upstream if ngx.ctx.exitSpan ~= nil then + local upstream_status = tonumber(ngx.var.upstream_status) + if upstream_status and upstream_status >= 500 then + Span.errorOccurred(ngx.ctx.exitSpan) Review comment: @Jijun ---------------------------------------------------------------- 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: us...@infra.apache.org