Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

kong/plugins/zipkin/opentracing.lua: Make credential optional #37

Merged
merged 1 commit into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kong/plugins/zipkin/opentracing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ function OpenTracingHandler:log(conf)
if ctx.authenticated_consumer then
request_span:set_tag("kong.consumer", ctx.authenticated_consumer.id)
end
if ctx.authenticated_credential then
if conf.include_credential and ctx.authenticated_credential then
request_span:set_tag("kong.credential", ctx.authenticated_credential.id)
end
request_span:set_tag("kong.node.id", kong.node.get_id())
Expand Down
1 change: 1 addition & 0 deletions kong/plugins/zipkin/schema.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ return {
{ sample_ratio = { type = "number",
default = 0.001,
between = { 0, 1 } } },
{ include_credential = { type = "boolean", required = true, default = true } },
},
}, },
},
Expand Down