Telemetry events for Phoenix.SessionProcess.
This module provides telemetry events that can be used to monitor session lifecycle, performance, and errors.
Events
The following telemetry events are emitted:
Session Lifecycle
[:phoenix, :session_process, :start]- When a session starts[:phoenix, :session_process, :stop]- When a session stops[:phoenix, :session_process, :start_error]- When session start fails
Communication
[:phoenix, :session_process, :call]- When a call is made to a session[:phoenix, :session_process, :cast]- When a cast is made to a session[:phoenix, :session_process, :communication_error]- When communication fails
Process Management
[:phoenix, :session_process, :worker_start]- When a worker process starts[:phoenix, :session_process, :worker_terminate]- When a worker process terminates[:phoenix, :session_process, :session_start]- When a session process starts[:phoenix, :session_process, :session_end]- When a session process ends
Cleanup
[:phoenix, :session_process, :auto_cleanup]- When a session is auto-cleaned up[:phoenix, :session_process, :cleanup]- When a session is cleaned up[:phoenix, :session_process, :cleanup_error]- When cleanup fails
Redux State Management
[:phoenix, :session_process, :redux, :dispatch]- When a Redux action is dispatched[:phoenix, :session_process, :redux, :subscribe]- When a subscription is created[:phoenix, :session_process, :redux, :unsubscribe]- When a subscription is removed[:phoenix, :session_process, :redux, :notification]- When subscriptions are notified[:phoenix, :session_process, :redux, :selector_cache_hit]- When selector cache is hit[:phoenix, :session_process, :redux, :selector_cache_miss]- When selector cache misses All events include the following metadata:session_id- The session ID (when applicable)module- The session modulepid- The process PID (when applicable)worker_spec- Worker specification details (for worker events)operation- Operation type (for error events)reason- Error reason (for error events)measurements- Performance measurements
Summary
Functions
Emits a telemetry event for automatic session cleanup.
Emits a telemetry event for communication error.
Emits a telemetry event for rate limit check.
Emits a telemetry event when rate limit is exceeded.
Emits a telemetry event for Redux action dispatch.
Emits a telemetry event for Redux subscription notification.
Emits a telemetry event for Redux selector cache hit.
Emits a telemetry event for Redux selector cache miss.
Emits a telemetry event for Redux subscription creation.
Emits a telemetry event for Redux subscription removal.
Emits a telemetry event for session call.
Emits a telemetry event for session cast.
Emits a telemetry event for session cleanup.
Emits a telemetry event for session cleanup error.
Emits a telemetry event for session process end.
Emits a telemetry event for session start.
Emits a telemetry event for session start error.
Emits a telemetry event for session process start.
Emits a telemetry event for session stop.
Emits a telemetry event for worker process start.
Emits a telemetry event for worker process termination.
Measures the execution time of a function and emits telemetry events.
Functions
Emits a telemetry event for automatic session cleanup.
Emits a telemetry event for communication error.
@spec emit_rate_limit_check(non_neg_integer(), non_neg_integer(), keyword()) :: :ok
Emits a telemetry event for rate limit check.
@spec emit_rate_limit_exceeded(non_neg_integer(), non_neg_integer(), keyword()) :: :ok
Emits a telemetry event when rate limit is exceeded.
Emits a telemetry event for Redux action dispatch.
@spec emit_redux_notification(String.t() | nil, non_neg_integer(), keyword()) :: :ok
Emits a telemetry event for Redux subscription notification.
Emits a telemetry event for Redux selector cache hit.
Emits a telemetry event for Redux selector cache miss.
Emits a telemetry event for Redux subscription creation.
Emits a telemetry event for Redux subscription removal.
Emits a telemetry event for session call.
Emits a telemetry event for session cast.
Emits a telemetry event for session cleanup.
Emits a telemetry event for session cleanup error.
Emits a telemetry event for session process end.
Emits a telemetry event for session start.
Emits a telemetry event for session start error.
Emits a telemetry event for session process start.
Emits a telemetry event for session stop.
Emits a telemetry event for worker process start.
Emits a telemetry event for worker process termination.
Measures the execution time of a function and emits telemetry events.