Sha256: 029f71b90b72ab78d098b8ee9c8c3d71e906dc4da6a2dc1e574c7cb15d38abbe

Contents?: true

Size: 718 Bytes

Versions: 13

Compression:

Stored size: 718 Bytes

Contents

module Skylight
  module Formatters
    module HTTP

      # Build instrumentation options for HTTP queries
      #
      # @param [String] method HTTP method, e.g. get, post
      # @param [String] scheme HTTP scheme, e.g. http, https
      # @param [String] host Request host, e.g. example.com
      # @param [String, Integer] port Request port
      # @param [String] path Request path
      # @param [String] query Request query string
      # @return [Hash] a hash containing `:category`, `:title`, and `:annotations`
      def self.build_opts(method, scheme, host, port, path, query)
        { category: "api.http.#{method.downcase}",
          title:    "#{method.upcase} #{host}" }
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
skylight-1.7.2 lib/skylight/formatters/http.rb
skylight-1.7.1 lib/skylight/formatters/http.rb
skylight-1.7.0 lib/skylight/formatters/http.rb
skylight-1.6.1 lib/skylight/formatters/http.rb
skylight-1.6.0 lib/skylight/formatters/http.rb
skylight-1.5.1 lib/skylight/formatters/http.rb
skylight-1.5.0 lib/skylight/formatters/http.rb
skylight-1.4.4 lib/skylight/formatters/http.rb
skylight-1.4.3 lib/skylight/formatters/http.rb
skylight-1.4.2 lib/skylight/formatters/http.rb
skylight-1.4.1 lib/skylight/formatters/http.rb
skylight-1.4.0 lib/skylight/formatters/http.rb
skylight-1.4.0.beta.2 lib/skylight/formatters/http.rb