You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/09/27 02:37:00 UTC

[GitHub] [skywalking-nginx-lua] wu-sheng commented on a change in pull request #42: add error check, status code great or equal than 500 would be in erro…

wu-sheng commented on a change in pull request #42:
URL: https://github.com/apache/skywalking-nginx-lua/pull/42#discussion_r495518643



##########
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:
       According to the discussion, I suggest you add `status_code` tag here.




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