Timber v3.0.0-alpha.2 Timber.Events.HTTPResponseEvent View Source

The HTTPResponseEvent tracks HTTP responses in your app, both outgoing and incoming from external services (should you choose to track these).

This gives you structured insight into all of your HTTP response events.

The defined structure of this data can be found in the log event JSON schema: https://github.com/timberio/log-event-json-schema

Timber can automatically track response events if you use a Plug based framework through Timber.Plug.

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.HTTPResponseEvent{
  body: String.t() | nil,
  direction: String.t() | nil,
  headers: map() | nil,
  headers_json: String.t() | nil,
  request_id: String.t() | nil,
  service_name: String.t() | nil,
  status: pos_integer(),
  time_ms: float()
}

Link to this section Functions

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

Message to be used when logging.

Builds a new struct taking care to:

  • Normalize header values so they are consistent.
  • Removes “” or nil values.