Sha256: 41d8bb9b0d042f8a045a4dff549402247cd7e4dfb03cb7f9b68556b911a9ff3a

Contents?: true

Size: 926 Bytes

Versions: 34

Compression:

Stored size: 926 Bytes

Contents

module Datadog
  module Ext
    module HTTP
      BASE_URL = 'http.base_url'.freeze
      ERROR_RANGE = 500...600
      METHOD = 'http.method'.freeze
      STATUS_CODE = 'http.status_code'.freeze
      TEMPLATE = 'template'.freeze
      TYPE = 'http'.freeze
      URL = 'http.url'.freeze

      # General header functionality
      module Headers
        module_function

        def to_tag(name)
          name.to_s.downcase.gsub(/[-\s]/, '_')
        end
      end

      # Request headers
      module RequestHeaders
        PREFIX = 'http.request.headers'.freeze

        module_function

        def to_tag(name)
          "#{PREFIX}.#{Headers.to_tag(name)}"
        end
      end

      # Response headers
      module ResponseHeaders
        PREFIX = 'http.response.headers'.freeze

        module_function

        def to_tag(name)
          "#{PREFIX}.#{Headers.to_tag(name)}"
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
ddtrace-0.23.1 lib/ddtrace/ext/http.rb
ddtrace-0.23.0 lib/ddtrace/ext/http.rb
ddtrace-0.22.0 lib/ddtrace/ext/http.rb
ddtrace-0.21.2 lib/ddtrace/ext/http.rb
ddtrace-0.21.1 lib/ddtrace/ext/http.rb
ddtrace-0.21.0 lib/ddtrace/ext/http.rb
ddtrace-0.20.0 lib/ddtrace/ext/http.rb
ddtrace-0.19.1 lib/ddtrace/ext/http.rb
ddtrace-0.19.0 lib/ddtrace/ext/http.rb
ddtrace-0.18.3 lib/ddtrace/ext/http.rb
ddtrace-0.18.2 lib/ddtrace/ext/http.rb
ddtrace-0.18.1 lib/ddtrace/ext/http.rb
ddtrace-0.18.0 lib/ddtrace/ext/http.rb
ddtrace-0.17.3 lib/ddtrace/ext/http.rb
ddtrace-0.17.2 lib/ddtrace/ext/http.rb
ddtrace-0.17.1 lib/ddtrace/ext/http.rb
ddtrace-0.17.0 lib/ddtrace/ext/http.rb
ddtrace-0.16.1 lib/ddtrace/ext/http.rb
ddtrace-0.15.0.internaltracinfeature1 lib/ddtrace/ext/http.rb
ddtrace-0.16.0 lib/ddtrace/ext/http.rb