module Aws::Telemetry

def http_request_attrs(context)

Other tags:
    Api: - private
def http_request_attrs(context)
  {
    'http.method' => context.http_request.http_method,
    'net.protocol.name' => 'http'
  }.tap do |h|
    h['net.protocol.version'] =
      if context.client.is_a? Seahorse::Client::AsyncBase
        '2'
      else
        Net::HTTP::HTTPVersion
      end
    unless context.config.stub_responses
      h['net.peer.name'] = context.http_request.endpoint.host
      h['net.peer.port'] = context.http_request.endpoint.port.to_s
    end
    if context.http_request.headers.key?('Content-Length')
      h['http.request_content_length'] =
        context.http_request.headers['Content-Length']
    end
  end
end

def http_response_attrs(context)

Other tags:
    Api: - private
def http_response_attrs(context)
  {
    'http.status_code' => context.http_response.status_code.to_s
  }.tap do |h|
    if context.http_response.headers.key?('Content-Length')
      h['http.response_content_length'] =
        context.http_response.headers['Content-Length']
    end
    if context.http_response.headers.key?('x-amz-request-id')
      h['aws.request_id'] =
        context.http_response.headers['x-amz-request-id']
    end
  end
end

def module_to_tracer_name(module_name)

Other tags:
    Api: - private
def module_to_tracer_name(module_name)
  "#{module_name.gsub('::', '.')}.client".downcase
end