> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-parallel-read-in-order-multi-part.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> SDK Elixir pour ClickStack - la stack d’observabilité ClickHouse

# Elixir

export const ClickStackIntegrates = ({signals = []}) => {
  const list = Array.isArray(signals) ? signals : String(signals).split(",");
  const supported = list.map(s => String(s).trim().toLowerCase());
  const pillStyle = {
    display: "inline-flex",
    alignItems: "center",
    padding: "0.125rem 0.625rem",
    borderRadius: "9999px",
    fontSize: "0.8125rem",
    fontWeight: 500,
    lineHeight: 1.6,
    color: "#161517",
    backgroundColor: "#faff69",
    border: "1px solid rgba(0, 0, 0, .1)",
    marginRight: "0.5rem"
  };
  return <div style={{
    margin: "0 0 1.25rem"
  }}>
      <span style={{
    marginRight: "0.5rem"
  }}>Ce guide intègre :</span>
      {supported.includes("logs") && <span style={pillStyle}>Logs</span>}
      {supported.includes("metrics") && <span style={pillStyle}>Métriques</span>}
      {supported.includes("traces") && <span style={pillStyle}>Traces</span>}
    </div>;
};

<ClickStackIntegrates signals={['logs']} />

*🚧 L’instrumentation OpenTelemetry pour les métriques et le tracing sera bientôt disponible !*

<h2 id="getting-started">
  Premiers pas
</h2>

<h3 id="install-hyperdx-logger-backend-package">
  Installer le paquet backend du logger ClickStack
</h3>

Le paquet s’installe en ajoutant `hyperdx` à votre liste de dépendances dans
`mix.exs`:

```elixir theme={null}
def deps do
  [
    {:hyperdx, "~> 0.1.6"}
  ]
end
```

<h3 id="configure-logger">
  Configurer le logger
</h3>

Ajoutez ce qui suit à votre fichier `config.exs` :

```elixir theme={null}
# config/releases.exs

config :logger,
  level: :info,
  backends: [:console, {Hyperdx.Backend, :hyperdx}]
```

<h3 id="configure-environment-variables">
  Configurer les variables d’environnement
</h3>

Vous devrez ensuite configurer les variables d’environnement suivantes dans votre
shell afin d’envoyer la télémétrie à ClickStack via l’OpenTelemetry Collector :

<Tabs>
  <Tab title="Managed ClickStack">
    ```shell theme={null}
    OTEL_SERVICE_NAME='<YOUR_SERVICE_NAME>'
    ```
  </Tab>

  <Tab title="ClickStack Open Source">
    ```shell theme={null}
    export HYPERDX_API_KEY='<YOUR_INGESTION_API_KEY>' \
    OTEL_SERVICE_NAME='<YOUR_SERVICE_NAME>'
    ```
  </Tab>
</Tabs>

*La variable d’environnement `OTEL_SERVICE_NAME` sert à identifier votre service
dans l’application HyperDX ; vous pouvez lui donner le nom de votre choix.*
