Class: Appsignal::EventFormatter::Faraday::RequestFormatter

Inherits:
Appsignal::EventFormatter show all
Defined in:
lib/appsignal/event_formatter/faraday/request_formatter.rb

Instance Method Summary collapse

Methods inherited from Appsignal::EventFormatter

format, formatter_classes, formatters, initialize_formatters, register, registered?, unregister

Instance Method Details

#format(payload) ⇒ Object


7
8
9
10
11
12
13
14
# File 'lib/appsignal/event_formatter/faraday/request_formatter.rb', line 7

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