Language SDKs

[Edit this page](https://github.com/ClickHouse/clickhouse-docs/blob/main/docs/use-cases/observability/clickstack/ingesting-data/sdks/index.md)

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.

## How it works[​](#how-it-works "Direct link to How it works")

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.

## Supported languages[​](#supported-languages "Direct link to Supported languages")

OpenTelemetry compatibility

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

  

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

## Securing with API key[​](#securing-api-key "Direct link to Securing with API key")

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

```
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](/docs/use-cases/observability/clickstack/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:

```
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
```

## Kubernetes integration[​](#kubernetes-integration "Direct link to Kubernetes integration")

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](/docs/use-cases/observability/clickstack/integrations/kubernetes#forwarding-resouce-tags-to-pods) for detailed setup instructions.

- [How it works](#how-it-works)- [Supported languages](#supported-languages)- [Securing with API key](#securing-api-key)- [Kubernetes integration](#kubernetes-integration)

Was this page helpful?