Skip to content

Commit 9d195e5

Browse files
committed
remove todo
1 parent cab6620 commit 9d195e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apisix/plugins/opentelemetry.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ local function inject_core_spans(root_span_ctx, api_ctx, conf)
411411
if root_span_ctx.span and not root_span_ctx:span():is_recording() then
412412
return
413413
end
414-
-- TODO: we should create another tracer object with always_on sampler in here,
415-
-- because the root span already decided to sample, all child spans should be sampled too.
414+
local conf = core.table.deepcopy(conf)
415+
conf.sampler.name = "always_on"
416416
local tracer, err = core.lrucache.plugin_ctx(lrucache, api_ctx, nil,
417417
create_tracer_obj, conf, plugin_info)
418418
if not tracer then

0 commit comments

Comments
 (0)