module Datadog::Tracing::Diagnostics::EnvironmentCollector

def agent_url

Returns:
  • (String, nil) - target agent URL for trace flushing
def agent_url
  # Retrieve the effect agent URL, regardless of how it was configured
  transport = Tracing.send(:tracer).writer.transport
  # return `nil` with IO transport
  return unless transport.respond_to?(:client)
  adapter = transport.client.api.adapter
  adapter.url
end