Sha256: a263bfb2b77b5dba430f57c9bee02fd6e735fd7ab64a572a988d75a8bd7c5082

Contents?: true

Size: 453 Bytes

Versions: 5

Compression:

Stored size: 453 Bytes

Contents

module Appsignal
  class EventFormatter
    module Faraday
      class RequestFormatter < Appsignal::EventFormatter
        register "request.faraday"

        def format(payload)
          http_method = payload[:method].to_s.upcase
          uri = payload[:url]
          [
            "#{http_method} #{uri.scheme}://#{uri.host}",
            "#{http_method} #{uri.scheme}://#{uri.host}#{uri.path}"
          ]
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
appsignal-2.1.2 lib/appsignal/event_formatter/faraday/request_formatter.rb
appsignal-2.1.1 lib/appsignal/event_formatter/faraday/request_formatter.rb
appsignal-2.1.1.beta.1 lib/appsignal/event_formatter/faraday/request_formatter.rb
appsignal-2.1.0 lib/appsignal/event_formatter/faraday/request_formatter.rb
appsignal-2.1.0.beta.1 lib/appsignal/event_formatter/faraday/request_formatter.rb