AppSignal v1.13.4 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

Ignore a process in the error handler.

ignored?(pid) deprecated

Check if a progress is ignored.

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

Specs

ignore(pid()) :: :ok

Ignore a process in the error handler.

This function is deprecated. Use Appsignal.TransactionRegistry.lookup/1 instead..

Specs

ignored?(pid()) :: boolean()

Check if a progress is ignored.

Specs

lookup(pid()) :: Appsignal.Transaction.t() | nil

Given a process ID, return its associated transaction.

Link to this function

pids_and_monitor_references(transaction)

View Source

Specs

register(Appsignal.Transaction.t()) :: :ok

Register the current process as the owner of the given transaction.

Link to this function

remove_transaction(transaction)

View Source

Specs

remove_transaction(Appsignal.Transaction.t()) ::
  :ok | {:error, :not_found} | {:error, :no_receiver}

Unregister the current process as the owner of the given transaction.