Timber v2.3.4 Timber.Events.HTTPClientResponseEvent View Source

The HTTPClientResponseEvent tracks responses for outgoing HTTP requests. This gives you structured insight into communication with external services.

See Timber.Events.HTTPClientRequestEvent for examples on track the entire HTTP request lifecycle.

Link to this section Summary

Functions

Message to be used when logging

Builds a new struct taking care to

Convenience methods for creating an event and getting the message at the same time

Link to this section Types

Link to this type t() View Source
t() :: %Timber.Events.HTTPClientResponseEvent{body: 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(h_t_t_p_client_response_event) View Source
message(t) :: IO.chardata

Message to be used when logging.

Builds a new struct taking care to:

  • Truncates the body if it is too large.
  • Normalize header values so they are consistent.
  • Removes “” or nil values.
Link to this function new_with_message(opts) View Source
new_with_message(Keyword.t) :: {t, IO.chardata}

Convenience methods for creating an event and getting the message at the same time.