WebsockexNova.Telemetry.TelemetryEvents (WebsockexNova v0.1.1)
View SourceCentral registry and documentation for all telemetry events emitted by WebsockexNova.
Event Names and Payloads
Connection Events
[:websockex_nova, :connection, :open]
- measurements:
%{duration: integer()}
(ms, optional) - metadata:
%{connection_id: term(), host: String.t(), port: integer()}
- measurements:
[:websockex_nova, :connection, :close]
- measurements:
%{duration: integer()}
(ms, optional) - metadata:
%{connection_id: term(), host: String.t(), port: integer(), reason: term()}
- measurements:
[:websockex_nova, :connection, :websocket_upgrade]
- measurements:
%{duration: integer()}
(ms, optional) - metadata:
%{connection_id: term(), stream_ref: reference(), headers: list()}
- measurements:
Message Events
[:websockex_nova, :message, :sent]
- measurements:
%{size: integer(), latency: integer()}
(bytes, ms) - metadata:
%{connection_id: term(), stream_ref: reference(), frame_type: atom()}
- measurements:
[:websockex_nova, :message, :received]
- measurements:
%{size: integer(), latency: integer()}
(bytes, ms) - metadata:
%{connection_id: term(), stream_ref: reference(), frame_type: atom()}
- measurements:
Error Events
[:websockex_nova, :error, :occurred]
- measurements:
%{}
metadata:
%{connection_id: term(), stream_ref: reference() | nil, reason: term(), context: map()}
- measurements:
Usage
Use these event names and payloads when emitting or subscribing to telemetry events.
Summary
Functions
Event emitted when an ownership transfer is received from another process.
Event emitted when a subscription restoration fails after reconnection.
Event emitted when a subscription is successfully restored after reconnection.
Functions
@spec ownership_transfer_received() :: [atom()]
Event emitted when an ownership transfer is received from another process.
Measurements
Empty map (timing is not relevant for this event)
Metadata
:gun_pid
- The Gun process PID:host
- Hostname of the connection:port
- Port number of the connection:stream_count
- Number of active streams transferred
@spec subscription_restoration_failed() :: [atom()]
Event emitted when a subscription restoration fails after reconnection.
Measurements
:duration
- Time taken before failure in milliseconds
Metadata
:connection_id
- The connection identifier:subscription_id
- The subscription identifier:channel
- The channel that failed to subscribe:reason
- The failure reason
@spec subscription_restored() :: [atom()]
Event emitted when a subscription is successfully restored after reconnection.
Measurements
:duration
- Time taken to restore the subscription in milliseconds
Metadata
:connection_id
- The connection identifier:subscription_id
- The subscription identifier:channel
- The channel being subscribed to