lib/instana/backend/host_agent.rb in instana-1.209.2 vs lib/instana/backend/host_agent.rb in instana-1.209.3
- old
+ new
@@ -50,12 +50,18 @@
e: discovery_value['pid'],
h: discovery_value['agentUuid']
}.reject { |_, v| v.nil? }
end
- # @return [Array] extra headers to include in the trace
+ # @return [Array] extra headers to capture with HTTP spans
def extra_headers
- discovery_value['extraHeaders']
+ if discovery_value['tracing']
+ # Starting with discovery version 1.6.4, this value is in tracing.extra-http-headers.
+ discovery_value['tracing']['extra-http-headers']
+ else
+ # Legacy fallback for discovery versions <= 1.6.3.
+ discovery_value['extraHeaders']
+ end
end
# @return [Hash] values which are removed from urls sent to the backend
def secret_values
discovery_value['secrets']