> ## 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 Konfiguration

Konfiguration. Wichtig, denn ohne sie weiß das AppSignal-Elixir-Paket nicht,
welche Anwendung es instrumentiert oder in welcher Umgebung.

In diesem Thema erklären wir, wie Sie AppSignal konfigurieren, was im Elixir-Paket
konfiguriert werden kann und was die minimal notwendige Konfiguration ist.

## Minimal erforderliche Konfiguration

Die minimal von AppSignal für Elixir erforderliche Konfiguration sind die
folgenden Punkte. Wenn diese nicht vorhanden sind, sendet AppSignal keine Daten an
AppSignal.com.

* Ein gültiger [Push-API-Key](/appsignal/terminology#push-api-key)
* Der OTP-App-Name der Anwendung
* Ein Anwendungsname
* Eine Anwendungsumgebung (`dev` / `prod` / `test`)
* Die Anwendungsumgebung muss auf `active: true` gesetzt sein

<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>

Alternativ können Sie den Agent über System-Umgebungsvariablen konfigurieren.
AppSignal wird automatisch aktiv, wenn die Umgebungsvariable `APPSIGNAL_PUSH_API_KEY`
gesetzt ist.

<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>

## Konfigurationsoptionen

Lesen Sie alle Konfigurationsoptionen auf der [Optionen-Seite](/elixir/configuration/options).

## Anwendungsumgebungen

Eine Anwendung kann mehrere Umgebungen haben, z. B. "development"/"dev",
"test", "staging" und "production".

Um die Fehler und Performance-Probleme, die in der "development"-Umgebung
auftreten, von denen in "production" zu trennen, ist es möglich, die Umgebung,
in der die Anwendung läuft, mit der Konfigurationsoption `env` festzulegen.

Eine typische Umgebungs-Konfigurationsdatei würde Folgendes enthalten.

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

Das obige Beispiel einer Konfigurationsdatei ist auch das, was vom AppSignal-Installer
pro Umgebung generiert wird.

Wenn Sie AppSignal pro Umgebung aktivieren, indem Sie `active: true` in der
Datei `config/{env}.exs` verwenden, ist die Option `active` in der Hauptdatei
`config/config.exs` nicht erforderlich.

### AppSignal für Tests deaktivieren

Wenn Sie Ihre gesamte AppSignal-Konfiguration in `config/config.exs` ablegen
statt in `config/prod.exs` (z. B. um AppSignal während der Entwicklung
aktiviert zu haben), stellen Sie sicher, dass Sie `active: false` in Ihre
Test-Konfiguration setzen, es sei denn, Sie möchten alle Ihre Testergebnisse senden.

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

## Beispielkonfiguration

<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>
