PushEx.Behaviour.PushInstrumentation behaviour (PushEx v2.1.0)
Implementable hook points for push lifecycle instrumentation. Callbacks are required but do not need to do anything.
Link to this section Summary
Callbacks
Called immediately before an API response is delivered.
Called when an API request is started.
Called when a push is delivered to a Channel. This can occur more, less, or the same number of times as a push being requested.
Called when a push is requested to be sent. By default this happens in the API controller.
Link to this section Callbacks
Link to this callback
api_processed(%PushEx.Instrumentation.Push.Context{})
Specs
Called immediately before an API response is delivered.
Link to this callback
api_requested(%PushEx.Instrumentation.Push.Context{})
Specs
Called when an API request is started.
Link to this callback
delivered(%PushEx.Push{}, %PushEx.Instrumentation.Push.Context{})
Specs
delivered( %PushEx.Push{channel: term(), data: term(), event: term(), unix_ms: term()}, %PushEx.Instrumentation.Push.Context{unix_ms_occurred_at: term()} ) :: any()
Called when a push is delivered to a Channel. This can occur more, less, or the same number of times as a push being requested.
Link to this callback
requested(%PushEx.Push{}, %PushEx.Instrumentation.Push.Context{})
Specs
requested( %PushEx.Push{channel: term(), data: term(), event: term(), unix_ms: term()}, %PushEx.Instrumentation.Push.Context{unix_ms_occurred_at: term()} ) :: any()
Called when a push is requested to be sent. By default this happens in the API controller.