AppSignal v1.2.0 Appsignal.Config
Summary
Functions
Returns whether the AppSignal agent is configured to start on application launch
Initializes the AppSignal config. Looks at the config default, the
Elixir-provided configuration and the various APPSIGNAL_*
OS environment variables. Returns whether or not the configuration is valid
Reset the config written to the environment by write_to_environment/1
.
This makes sure no existing config gets reused and the configuration for the
agent gets set again
Write the currently known AppSignal configuration to the system environment. Must be run before starting the AppSignal agent otherwise it won’t know the correct configuration
Functions
Returns whether the AppSignal agent is configured to start on application launch.
Initializes the AppSignal config. Looks at the config default, the
Elixir-provided configuration and the various APPSIGNAL_*
OS environment variables. Returns whether or not the configuration is valid.
Reset the config written to the environment by write_to_environment/1
.
This makes sure no existing config gets reused and the configuration for the
agent gets set again.
Write the currently known AppSignal configuration to the system environment. Must be run before starting the AppSignal agent otherwise it won’t know the correct configuration.
Example
case {Appsignal.Config.initialize, Appsignal.Config.active?} do
{:ok, true} ->
Appsignal.Config.write_to_environment
Appsignal.Nif.start
{:ok, false} ->
# AppSignal not active
{{:error, :invalid_config}, _} ->
# AppSignal has invalid config
end