> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appsignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AppSignal Elixir-configuratie

Configuratie. Belangrijk, want zonder configuratie weet het AppSignal Elixir-pakket
niet welke applicatie het instrumenteert of in welke omgeving.

In dit onderwerp leggen we uit hoe u AppSignal configureert, wat er in het
Elixir-pakket kan worden geconfigureerd en wat de minimaal benodigde configuratie is.

## Minimaal vereiste configuratie

De minimaal vereiste configuratie voor AppSignal voor Elixir bestaat uit de
volgende items. Als deze niet aanwezig zijn, zal AppSignal geen data naar
AppSignal.com sturen.

* Een geldige [Push API-sleutel](/appsignal/terminology#push-api-key)
* De OTP-naam van de applicatie
* Een applicatienaam
* Een applicatieomgeving (`dev` / `prod` / `test`)
* De applicatieomgeving moet ingesteld zijn op `active: true`

<CodeGroup>
  ```elixir Elixir theme={null}
  # Example minimal config file
  # config/config.exs
  config :appsignal, :config,
    otp_app: :appsignal_phoenix_example,
    name: "AppsignalPhoenixExample",
    push_api_key: "your-push-api-key",
    env: Mix.env,
    active: true
  ```
</CodeGroup>

Alternatief kunt u de agent configureren met systeemomgevingsvariabelen.
AppSignal wordt automatisch actief als de `APPSIGNAL_PUSH_API_KEY`-omgevingsvariabele
is ingesteld.

<CodeGroup>
  ```elixir Elixir theme={null}
  export APPSIGNAL_OTP_APP="appsignal_phoenix_example"
  export APPSIGNAL_PUSH_API_KEY="your-push-api-key"
  export APPSIGNAL_APP_NAME="AppsignalPhoenixExample"
  export APPSIGNAL_APP_ENV="prod"
  ```
</CodeGroup>

## Configuratieopties

Lees over alle configuratieopties op de [optiespagina](/elixir/configuration/options).

## Applicatieomgevingen

Een applicatie kan meerdere omgevingen hebben, zoals "development"/"dev",
"test", "staging" en "production".

Om de fouten en performanceproblemen die in de "development"-omgeving optreden
te scheiden van die in "production", kunt u met de configuratieoptie `env`
instellen in welke omgeving de applicatie draait.

Een typisch configuratiebestand voor een omgeving bevat het volgende.

<CodeGroup>
  ```elixir Elixir theme={null}
  # config/prod.exs
  config :appsignal, :config,
    active: true,
    env: :prod
  ```
</CodeGroup>

Het bovenstaande voorbeeld van een configuratiebestand is ook wat door de
AppSignal-installer per omgeving wordt gegenereerd.

Als u AppSignal per omgeving activeert met `active: true` in het bestand
`config/{env}.exs`, dan is de optie `active` niet vereist in het hoofdbestand
`config/config.exs`.

### AppSignal uitschakelen voor tests

Als u uw volledige AppSignal-configuratie in `config/config.exs` plaatst in
plaats van in `config/prod.exs` (bijvoorbeeld om AppSignal ingeschakeld te
hebben tijdens ontwikkeling), zorg er dan voor dat u `active: false` in uw
testconfiguratie plaatst, tenzij u al uw testresultaten wilt indienen.

<CodeGroup>
  ```elixir Elixir theme={null}
  # config/test.exs
  config :appsignal, :config,
    active: false
  ```
</CodeGroup>

## Voorbeeldconfiguratie

<CodeGroup>
  ```elixir Elixir theme={null}
  # config/config.exs
  config :appsignal, :config,
    otp_app: :appsignal_phoenix_example,
    name: "AppsignalPhoenixExample",
    push_api_key: "your-push-api-key",
    env: Mix.env,
  ```
</CodeGroup>

<CodeGroup>
  ```elixir Elixir theme={null}
  # config/test.exs
  config :appsignal, :config,
    active: false
  ```
</CodeGroup>
