mirror of
https://gitee.com/iresty/apisix.git
synced 2024-12-05 21:47:36 +08:00
feat: update skywalking componentId (#4060)
Co-authored-by: Yuelin Zheng <2226815922@qq.com> Co-authored-by: zhuanghaochao <zhuanghaochao@yy.com>
This commit is contained in:
parent
0a8670041a
commit
77f8926d64
@ -17,6 +17,7 @@
|
|||||||
local sw_tracer = require("skywalking.tracer")
|
local sw_tracer = require("skywalking.tracer")
|
||||||
local core = require("apisix.core")
|
local core = require("apisix.core")
|
||||||
local process = require("ngx.process")
|
local process = require("ngx.process")
|
||||||
|
local Span = require("skywalking.span")
|
||||||
local ngx = ngx
|
local ngx = ngx
|
||||||
local math = math
|
local math = math
|
||||||
local require = require
|
local require = require
|
||||||
@ -90,6 +91,8 @@ end
|
|||||||
|
|
||||||
function _M.body_filter(conf, ctx)
|
function _M.body_filter(conf, ctx)
|
||||||
if ctx.skywalking_sample and ngx.arg[2] then
|
if ctx.skywalking_sample and ngx.arg[2] then
|
||||||
|
Span.setComponentId(ngx.ctx.exitSpan, 6002)
|
||||||
|
Span.setComponentId(ngx.ctx.entrySpan, 6002)
|
||||||
sw_tracer:finish()
|
sw_tracer:finish()
|
||||||
core.log.info("tracer finish")
|
core.log.info("tracer finish")
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user