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

> Elixir SDK for ClickStack - The ClickHouse Observability Stack

# Elixir

<table>
  <tbody>
    <tr>
      <td className="pe-2">✅ Logs</td>
      <td className="pe-2">✖️ Metrics</td>
      <td className="pe-2">✖️ Traces</td>
    </tr>
  </tbody>
</table>

*🚧 OpenTelemetry metrics & tracing instrumentation coming soon!*

<h2 id="getting-started">
  Getting started
</h2>

<h3 id="install-hyperdx-logger-backend-package">
  Install ClickStack logger backend package
</h3>

The package can be installed by adding `hyperdx` to your list of dependencies in
`mix.exs`:

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

<h3 id="configure-logger">
  Configure logger
</h3>

Add the following to your `config.exs` file:

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

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

<h3 id="configure-environment-variables">
  Configure environment variables
</h3>

Afterwards you'll need to configure the following environment variables in your
shell to ship telemetry to ClickStack via the OpenTelemetry collector:

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

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

*The `OTEL_SERVICE_NAME` environment variable is used to identify your service
in the HyperDX app, it can be any name you want.*
