Timber v2.3.0 Timber.Events.HTTPServerRequestEvent View Source

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 the documentation for Timber.Integerations.EventPlug for more information. The README.md also outlines how to set this up.

Link to this section Summary

Functions

Message to be used when logging

Builds a new struct taking care to

Link to this section Types

Link to this type t() View Source
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}

Link to this section Functions

Link to this function message(h_t_t_p_server_request_event) View Source
message(t) :: IO.chardata

Message to be used when logging.

Builds a new struct taking care to:

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