AppSignal v1.10.9 Appsignal.Config View Source

Link to this section Summary

Functions

Returns true if the configuration is valid and the AppSignal agent is configured to start on application launch.

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.

Link to this section Functions

Returns true if the configuration is valid and the AppSignal agent is configured to start on application launch.

Link to this function

configured_as_active?() View Source
configured_as_active?() :: boolean()

Returns whether the AppSignal agent is configured to start on application launch.

Link to this function

initialize() View Source
initialize() :: :ok | {:error, :invalid_config}

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.

Link to this function

minutely_probes_enabled?() View Source

Link to this function

reset_environment_config!() View Source

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