AppSignal v1.12.0-beta.1 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

Link to this function

ignore(pid)

View Source
ignore(pid()) :: :ok

Ignore a process in the error handler.

Link to this function

ignored?(pid)

View Source
ignored?(pid()) :: boolean()
This function is deprecated. Use Appsignal.TransactionRegistry.lookup/1 instead..

Check if a progress is ignored.

Given a process ID, return its associated transaction.

Link to this function

pids_and_monitor_references(transaction)

View Source
Link to this function

register(transaction)

View Source
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
remove_transaction(Appsignal.Transaction.t()) ::
  :ok | {:error, :not_found} | {:error, :no_receiver}

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