PryIn v0.1.2 PryIn.InteractionStore

Stores interactions that will later be forwarded by the forwarder.

When a certain amount of interactions is in the store, further interactions will simply be dropped to avoid overflow.

When the stored interactions are forwarded, the internal list is cleared and the limit is reset.

This amount can be configured with: config :pryin, :max_interactions_for_interval, 100

Summary

Functions

Adds custom metric data to a running interaction

Adds ecto query data to a running interaction

Adds view rendering data to a running interaction

Finishes a running interaction

Returns the field value of the running interaction with the given pid

Returns whether there is a running interaction for the given pid

Returns and clears the list of running interactions

Updates a running interactions data

Functions

add_custom_metric(pid, data)

Adds custom metric data to a running interaction.

add_ecto_query(pid, data)

Adds ecto query data to a running interaction.

add_view_rendering(pid, data)

Adds view rendering data to a running interaction.

finish_interaction(pid)

Finishes a running interaction.

Finished interactions are moved from the running interactions list to the finished interactions list. They still count towards the max_interactions_for_interval limit. When the InteractionForwarder polls for interactions, only finished ones are returned.

get_field(pid, field)

Returns the field value of the running interaction with the given pid.

has_pid?(pid)

Returns whether there is a running interaction for the given pid.

pop_finished_interactions()

Returns and clears the list of running interactions.

Called by the forwarder.

set_interaction_data(pid, data)

Updates a running interactions data.

start_interaction(pid, interaction)

Start an interaction.

Adds an interaction - identified by a pid - to the internal interactions list.