class Logtail::Integrations::Rack::HTTPRequest
The HTTP server request event tracks incoming HTTP requests to your HTTP server. Such as unicorn, webrick, puma, etc.
@note This event should be installed automatically through integrations,
such as the {Integrations::ActionController::LogSubscriber} integration.
Attributes
body[R]
content_length[R]
headers[R]
headers_json[R]
host[R]
method[R]
path[R]
port[R]
query_string[R]
request_id[R]
scheme[R]
service_name[R]
Public Class Methods
new(attributes)
click to toggle source
# File lib/logtail-rack/http_request.rb, line 13 def initialize(attributes) @body = attributes[:body] @content_length = attributes[:content_length] @headers = attributes[:headers] @host = attributes[:host] @method = attributes[:method] @path = attributes[:path] @port = attributes[:port] @query_string = attributes[:query_string] @scheme = attributes[:scheme] @request_id = attributes[:request_id] @service_name = attributes[:service_name] if @headers @headers_json = @headers.to_json end end
Public Instance Methods
message()
click to toggle source
# File lib/logtail-rack/http_request.rb, line 31 def message 'Started %s "%s"' % [method, path] end