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

> Language SDKs for ClickStack - The ClickHouse Observability Stack

# Language SDKs

Data is typically sent to ClickStack via the **OpenTelemetry (OTel) collector**, either directly from language SDKs or through intermediate OpenTelemetry collector acting as agents e.g. collecting infrastructure metrics and logs.

Language SDKs are responsible for collecting telemetry from within your application - most notably **traces** and **logs** - and exporting this data to the OpenTelemetry collector, via the OTLP endpoint, which handles ingestion into ClickHouse.

In browser-based environments, SDKs may also be responsible for collecting **session data**, including UI events, clicks, and navigation thus enabling replays of user sessions.

<h2 id="how-it-works">
  How it works
</h2>

1. Your application uses a ClickStack SDK (e.g., Node.js, Python, Go). These SDKs are based on the OpenTelemetry SDKs with additional features and usability enhancements.
2. The SDK collects and exports traces and logs via OTLP (HTTP or gRPC).
3. The OpenTelemetry collector receives the telemetry and writes it to ClickHouse via the configured exporters.

<h2 id="supported-languages">
  Supported languages
</h2>

<Info>
  **OpenTelemetry compatibility**

  While ClickStack offers its own language SDKs with enhanced telemetry and features, you can also use their existing OpenTelemetry SDKs seamlessly.
</Info>

<br />

| Language     | Description                                     | Link                                                          |
| ------------ | ----------------------------------------------- | ------------------------------------------------------------- |
| AWS Lambda   | Instrument your AWS Lambda functions            | [Documentation](/clickstack/ingesting-data/sdks/aws-lambda)   |
| Browser      | JavaScript SDK for Browser-based applications   | [Documentation](/clickstack/ingesting-data/sdks/browser)      |
| Elixir       | Elixir applications                             | [Documentation](/clickstack/ingesting-data/sdks/elixir)       |
| Go           | Go applications and microservices               | [Documentation](/clickstack/ingesting-data/sdks/golang)       |
| Java         | Java applications                               | [Documentation](/clickstack/ingesting-data/sdks/java)         |
| NestJS       | NestJS applications                             | [Documentation](/clickstack/ingesting-data/sdks/nestjs)       |
| Next.js      | Next.js applications                            | [Documentation](/clickstack/ingesting-data/sdks/nextjs)       |
| Node.js      | JavaScript runtime for server-side applications | [Documentation](/clickstack/ingesting-data/sdks/nodejs)       |
| Deno         | Deno applications                               | [Documentation](/clickstack/ingesting-data/sdks/deno)         |
| Python       | Python applications and web services            | [Documentation](/clickstack/ingesting-data/sdks/python)       |
| React Native | React Native mobile applications                | [Documentation](/clickstack/ingesting-data/sdks/react-native) |
| Ruby         | Ruby on Rails applications and web services     | [Documentation](/clickstack/ingesting-data/sdks/ruby)         |

<h2 id="securing-api-key">
  Securing with API key
</h2>

:::Not required for Managed ClickStack
The API key isn't required for managed ClickStack.
:::

In order to send data to ClickStack via the OTel collector, SDKs will need to specify an ingestion API key. This can either be set using an `init` function in the SDK or an `OTEL_EXPORTER_OTLP_HEADERS` environment variable:

```shell theme={null}
OTEL_EXPORTER_OTLP_HEADERS='authorization=<YOUR_INGESTION_API_KEY>'
```

This API key is generated by the ClickStack UI (HyperDX) application, and is available via the app in `Team Settings → API Keys`.

For most [language SDKs](/clickstack/ingesting-data/sdks) and telemetry libraries that support OpenTelemetry, you can simply set `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable in your application or specify it during initialization of the SDK:

```shell theme={null}
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
```

<h2 id="kubernetes-integration">
  Kubernetes integration
</h2>

All SDKs support automatic correlation with Kubernetes metadata (pod name, namespace, etc.) when running in a Kubernetes environment. This allows you to:

* View Kubernetes metrics for pods and nodes associated with your services
* Correlate application logs and traces with infrastructure metrics
* Track resource usage and performance across your Kubernetes cluster

To enable this feature, configure the OpenTelemetry collector to forward resource tags to pods. See the [Kubernetes integration guide](/clickstack/integration-examples/kubernetes#forwarding-resouce-tags-to-pods) for detailed setup instructions.
