Timber v1.1.16 Timber.Events.HTTPServerRequestEvent

The HTTPServerRequestEvent tracks incoming HTTP requests. This gives you structured insight into the HTTP requests coming into your app.

Timber can automatically track incoming HTTP requests if you use a Plug based framework. See Timber.Integrations.ContextPlug and Timber.Integerations.EventPlug. Also, the README.md outlines how to set these up.

Summary

Functions

Message to be used when logging

Builds a new struct taking care to

Types

t()
t() :: %Timber.Events.HTTPServerRequestEvent{body: String.t | nil, headers: map | nil, host: String.t, method: String.t, path: String.t, port: pos_integer | nil, query_string: String.t | nil, request_id: String.t | nil, scheme: String.t}

Functions

message(h_t_t_p_server_request_event)
message(t) :: IO.chardata

Message to be used when logging.

new(opts)
new(Keyword.t) :: t

Builds a new struct taking care to:

  • Parsing the :url and mapping it to the appropriate attributes.
  • Truncate the body if it is too large.
  • Normalize header values so they are consistent.
  • Normalize the method.
  • Removes “” or nil values.