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

Commit

Permalink
kong/plugins/zipkin/opentracing.lua: Support deprecated api model in …
Browse files Browse the repository at this point in the history
…addition to services and routes
  • Loading branch information
james-callahan committed Aug 3, 2018
1 parent c627c36 commit 4a645e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Of those, this plugin currently uses:

In addition to the above standardised tags, this plugin also adds:

- `kong.api` (deprecated)
- `kong.consumer`
- `kong.credential`
- `kong.route`
Expand Down
2 changes: 2 additions & 0 deletions kong/plugins/zipkin/opentracing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ function OpenTracingHandler:log(conf)
if ctx.service.name ~= ngx.null then
proxy_span:set_tag("peer.service", ctx.service.name)
end
elseif ctx.api and ctx.api.id then
proxy_span:set_tag("kong.api", ctx.api.id)
end
proxy_span:finish(proxy_end)
request_span:finish(now)
Expand Down

0 comments on commit 4a645e9

Please sign in to comment.