Module traces_for_apps

This module gathers all the code that allows to lighten the trace macros for (Myriad) applications.

Description

This module gathers all the code that allows to lighten the trace macros for (Myriad) applications.

Data Types

aggregator_pid()

aggregator_pid() = class_TraceAggregator:aggregator_pid()

initialise_supervision()

initialise_supervision() = class_TraceAggregator:initialise_supervision()

module_name()

module_name() = basic_utils:module_name()

Function Index

app_immediate_stop/2Stops specified (Myriad - not specifically related to OTP) application immediately, not waiting for any trace supervisor, stopping the trace aggregator, and finishing on the shell.
app_start/2Starts the specified application.
app_start/3Starts specified (Myriad - not specifically related to OTP) application, deciding whether EXIT messages shall be trapped.
app_start/4Starts specified (Myriad - not specifically related to OTP) application, deciding whether EXIT messages shall be trapped and the registration scope of the resulting trace aggregator.
app_stop/3Stops the specified (Myriad - not specifically related to OTP) application, waiting for the trace supervisor if requested.
app_stop_on_shell/2Stops specified (Myriad - not specifically related to OTP) application, stopping the trace aggregator and finishing on the shell.

Function Details

app_immediate_stop/2

app_immediate_stop(ModuleName::module_name(), TraceAggregatorPid::aggregator_pid()) -> no_return()

Stops specified (Myriad - not specifically related to OTP) application immediately, not waiting for any trace supervisor, stopping the trace aggregator, and finishing on the shell.

To be called from the counterpart macro.

app_start/2

app_start(ModuleName::module_name(), InitTraceSupervisor::initialise_supervision()) -> aggregator_pid()

Starts the specified application.

To be called notably from the counterpart macro.

The trace supervisor can be requested to be initialized now or not at all, or later (typically only once the desired filename for the traces file will be known for good, i.e. at its first renaming).

Here we disable explicitly the trapping of EXIT signals, as a function run through "erl -eval" or through "erl -run" (like our apps) will be executed in a process that will silently trap EXIT signals, which would mean that the crash of any process created from the app, even thanks to spawn_link, would most probably remain unnoticed (just leading to an EXIT message happily sitting in the mailbox of the app process).

The resulting trace aggregator will be registered globally (only).

app_start/3

app_start(ModuleName::module_name(), InitTraceSupervisor::initialise_supervision(), DisableExitTrapping::boolean()) -> aggregator_pid()

Starts specified (Myriad - not specifically related to OTP) application, deciding whether EXIT messages shall be trapped.

The trace supervisor can be requested to be initialized now or not at all, or later (typically only once the desired filename for the traces file will be known for good, i.e. at its first renaming).

The trapping of EXIT messages may be disabled (by setting DisableExitTrapping to true), typically in most tests / cases (see comments in app_start/2). However it may also be left as it is, notably when this function is executed from a supervisor (see traces_bridge_sup:init/1), whose trapping of EXITs shall not be altered (otherwise, for example, shutdowns may freeze).

The resulting trace aggregator will be registered globally (only).

app_start/4

app_start(ModuleName::module_name(), InitTraceSupervisor::initialise_supervision(), DisableExitTrapping::boolean(), AggRegScope::naming_utils:registration_scope()) -> aggregator_pid()

Starts specified (Myriad - not specifically related to OTP) application, deciding whether EXIT messages shall be trapped and the registration scope of the resulting trace aggregator.

The trace supervisor can be requested to be initialized now or not at all, or later (typically only once the desired filename for the traces file will be known for good, i.e. at its first renaming).

The trapping of EXIT messages may be disabled (by setting DisableExitTrapping to true), typically in most tests / cases (see comments in app_start/2). However it may also be left as it is, notably when this function is executed from a supervisor (see traces_bridge_sup:init/1), whose trapping of EXITs shall not be altered (otherwise, for example, shutdowns may freeze).

app_stop/3

app_stop(ModuleName::module_name(), TraceAggregatorPid::aggregator_pid(), WaitForTraceSupervisor::boolean()) -> no_return()

Stops the specified (Myriad - not specifically related to OTP) application, waiting for the trace supervisor if requested.

To be called from the counterpart macro.

app_stop_on_shell/2

app_stop_on_shell(ModuleName::module_name(), TraceAggregatorPid::aggregator_pid()) -> no_return()

Stops specified (Myriad - not specifically related to OTP) application, stopping the trace aggregator and finishing on the shell.

To be called from the counterpart macro, directly or not.


Generated by EDoc