This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 77f8926  feat: update skywalking componentId (#4060)
77f8926 is described below

commit 77f8926d64f256ffa062e4ca39725c5bd0a779c7
Author: Daming <[email protected]>
AuthorDate: Fri Apr 16 17:25:51 2021 +0800

    feat: update skywalking componentId (#4060)
    
    Co-authored-by: Yuelin Zheng <[email protected]>
    Co-authored-by: zhuanghaochao <[email protected]>
---
 apisix/plugins/skywalking.lua | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/apisix/plugins/skywalking.lua b/apisix/plugins/skywalking.lua
index 5d6553a..14b1323 100644
--- a/apisix/plugins/skywalking.lua
+++ b/apisix/plugins/skywalking.lua
@@ -17,6 +17,7 @@
 local sw_tracer = require("skywalking.tracer")
 local core = require("apisix.core")
 local process = require("ngx.process")
+local Span = require("skywalking.span")
 local ngx = ngx
 local math = math
 local require = require
@@ -90,6 +91,8 @@ end
 
 function _M.body_filter(conf, ctx)
     if ctx.skywalking_sample and ngx.arg[2] then
+        Span.setComponentId(ngx.ctx.exitSpan, 6002)
+        Span.setComponentId(ngx.ctx.entrySpan, 6002)
         sw_tracer:finish()
         core.log.info("tracer finish")
     end

Reply via email to