AppSignal v1.4.2 Appsignal.TransactionRegistry View Source
Internal module which keeps a registry of the transaction handles linked to their originating process.
This is used on various places to link a calling process to its transaction.
For instance, the Appsignal.ErrorHandler
module uses it to be able to
complete the transaction in case the originating process crashed.
The transactions are stored in an ETS table (with
{:write_concurrency, true}
, so no bottleneck is created); and the
originating process is monitored to clean up the ETS table when the
process has finished.
Link to this section Summary
Functions
Given a process ID, return its associated transaction
Register the current process as the owner of the given transaction
Unregister the current process as the owner of the given transaction
Link to this section Functions
lookup(pid(), boolean()) :: Appsignal.Transaction.t() | nil
Given a process ID, return its associated transaction.
Register the current process as the owner of the given transaction.
remove_transaction(Appsignal.Transaction.t()) :: :ok | {:error, :not_found}
Unregister the current process as the owner of the given transaction.