> For the complete documentation index, see [llms.txt](https://docs.warpstream.com/warpstream/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.warpstream.com/warpstream/reference/integrations/opentelemetry-collector.md).

# OpenTelemetry Collector

The Kafka exporteris no longer bundled as part of the standard otel collector, so you'll need to use one of the [contrib releases](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases).

## Unauthenticated / BYOC WarpStream Cluster (Example)

The sample configuration file below demonstrates how to configure the OpenTelemetry collector with a Kafka exporter that writes to an unauthenticated WarpStream cluster. This setup makes the most sense when you're self-hosting the WarpStream Agents in your own cloud account / VPC using the BYOC product.

```yaml
receivers:
  otlp:
    protocols:
      http:
        cors:
          allowed_origins:
            - "*"

processors:
  batch:

exporters:
  logging:
    loglevel: debug
  kafka:
    brokers: ["<YOUR_WARPSTREAM_BOOTSTRAP_URL>:9092"]
    topic: "traces"
service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging, kafka]
```

## Authenticated WarpStream Cluster (Example)

The sample configuration file below demonstrates how to configure the OpenTelemetry collector with a Kafka exporter that writes to an authenticated WarpStream cluster.

<pre class="language-yaml"><code class="lang-yaml"><strong>receivers:
</strong>  otlp:
    protocols:
      http:
        cors:
          allowed_origins:
            - "*"

processors:
  batch:

exporters:
  logging:
    loglevel: debug
  kafka:
    brokers: ["&#x3C;YOUR_WARPSTREAM_BOOTSTRAP_URL>:9092"]
    topic: "traces"
    auth:
      sasl:
        username: $USERNAME
        password: $PASSWORD
        mechanism: PLAIN
        version: 1
      tls:
        insecure: true
service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging, kafka]
</code></pre>

## Configuring Zone Aware Routing

`v0.92.0` of the collector supports specifying Kafka client IDs like so:

```yaml
receivers:
  otlp:
    protocols:
      http:
        cors:
          allowed_origins:
            - "*"

processors:
  batch:

exporters:
  logging:
    loglevel: debug
  kafka:
    brokers: ["<YOUR_WARPSTREAM_BOOTSTRAP_URL>:9092"]
    client_id: "warpstream_az=us-east-1a"
    topic: "traces"
    auth:
      sasl:
        username: $USERNAME
        password: $PASSWORD
        mechanism: PLAIN
        version: 1
      tls:
        insecure: true
service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging, kafka]
```

See our documentation on [configuring WarpStream features via the Kafka Client ID](/warpstream/kafka/configure-kafka-client/configuring-kafka-client-id-features.md#warpstream_az) for more details.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.warpstream.com/warpstream/reference/integrations/opentelemetry-collector.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
