Skip to content
Open
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
6 changes: 6 additions & 0 deletions kong/observability/tracing/instrumentation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ function _M.balancer(ctx)

if balancer_data.hostname ~= nil then
span:set_attribute("net.peer.name", balancer_data.hostname)
span:set_attribute("net.peer.port", balancer_data.port)
span:set_attribute("http.method", get_method())
span:set_attribute("http.url", balancer_data.scheme .. "://" .. balancer_data.hostname .. ctx.request_uri)
end

if try.balancer_latency_ns ~= nil then
Expand All @@ -139,6 +142,9 @@ function _M.balancer(ctx)

if balancer_data.hostname ~= nil then
span:set_attribute("net.peer.name", balancer_data.hostname)
span:set_attribute("net.peer.port", balancer_data.port)
span:set_attribute("http.method", get_method())
span:set_attribute("http.url", balancer_data.scheme .. "://" .. balancer_data.hostname .. ctx.request_uri)
end

local upstream_finish_time = ctx.KONG_BODY_FILTER_ENDED_AT_NS
Expand Down