Telemetry instrumentation for ExMqtt using :telemetry ~> 1.4.
Events
Connection Lifecycle (ExMqtt.Connection)
[:ex_mqtt, :connection, :connect, :start]- emitted when opening transport & sending CONNECT[:ex_mqtt, :connection, :connected]- emitted when CONNACK:successis received[:ex_mqtt, :connection, :disconnected]- emitted when the connection closes or is refused[:ex_mqtt, :connection, :reconnect, :scheduled]- emitted when an exponential-backoff reconnect timer is scheduled
Messaging & Subscriptions
[:ex_mqtt, :publish, :sent]- emitted when an outbound PUBLISH is transmitted[:ex_mqtt, :publish, :received]- emitted when an inbound PUBLISH is delivered[:ex_mqtt, :subscribe, :stop]- emitted when SUBACK is received[:ex_mqtt, :unsubscribe, :stop]- emitted when UNSUBACK is received
Packets & Enhanced Authentication (MQTT 5.0)
[:ex_mqtt, :packet, :sent]- emitted for every encoded MQTT control packet sent over the wire[:ex_mqtt, :packet, :received]- emitted for every decoded MQTT control packet received[:ex_mqtt, :auth, :sent]- emitted when an outbound MQTT 5.0 AUTH packet is sent[:ex_mqtt, :auth, :received]- emitted when an inbound MQTT 5.0 AUTH packet is received
Summary
Functions
Attaches a default Logger-based telemetry handler for debugging and observability.
Detaches the default telemetry logger handler.
Executes a telemetry event with measurements and metadata.
Wraps an operation in :telemetry.span/3.
Functions
@spec attach_default_logger(keyword()) :: :ok | {:error, :already_exists}
Attaches a default Logger-based telemetry handler for debugging and observability.
@spec detach_default_logger(String.t()) :: :ok | {:error, :not_found}
Detaches the default telemetry logger handler.
@spec events() :: [[atom()]]
Returns the list of all telemetry event names emitted by ExMqtt.
Executes a telemetry event with measurements and metadata.
Wraps an operation in :telemetry.span/3.