class ElasticAPM::Span::Context::Destination

def self.from_uri(uri_or_str, type: 'external')

def self.from_uri(uri_or_str, type: 'external')
  uri = normalize(uri_or_str)
  new(
    name: only_scheme_and_host(uri),
    resource: "#{uri.host}:#{uri.port}",
    type: type
  )
end