Attributes
init_time | [RW] |
Public Class methods
new(*)
intercepts request initialization to inject the tracing logic.
[show source]
# File lib/httpx/adapters/datadog.rb 186 def initialize(*) 187 super 188 189 @init_time = nil 190 191 return unless Datadog::Tracing.enabled? 192 193 RequestTracer.call(self) 194 end
Public Instance methods
response=(*)
[show source]
# File lib/httpx/adapters/datadog.rb 196 def response=(*) 197 # init_time should be set when it's send to a connection. 198 # However, there are situations where connection initialization fails. 199 # Example is the :ssrf_filter plugin, which raises an error on 200 # initialize if the host is an IP which matches against the known set. 201 # in such cases, we'll just set here right here. 202 @init_time ||= ::Datadog::Core::Utils::Time.now.utc 203 204 super 205 end