HTTP.WebSocket.Telemetry (http_web_socket v0.21.17)

Copy Markdown View Source

Telemetry helpers for WebSocket lifecycle and message events.

Emitted URLs retain scheme, host, port, and path, but omit userinfo, authority, query, and fragment so URL credentials cannot reach handlers. A nil URL omits all URL-derived metadata.

Summary

Types

url()

@type url() :: URI.t() | nil

Functions

close_start(url, code)

@spec close_start(url(), non_neg_integer() | nil) :: :ok

close_stop(url, code, was_clean)

@spec close_stop(url(), non_neg_integer() | nil, boolean()) :: :ok

connect_exception(url, error, duration)

@spec connect_exception(url(), term(), non_neg_integer()) :: :ok

connect_start(url)

@spec connect_start(url()) :: :ok

connect_stop(url, protocol, duration, http_version \\ :http1, fallback \\ false)

@spec connect_stop(url(), String.t(), non_neg_integer(), :http1 | :http2, boolean()) ::
  :ok

message_received(url, opcode, bytes)

@spec message_received(url(), String.t(), non_neg_integer()) :: :ok

message_sent(url, opcode, bytes, buffered_amount)

@spec message_sent(url(), String.t(), non_neg_integer(), non_neg_integer()) :: :ok