<p>I'm having kafka cluster deployed in openshift in different namespace also opentelemetry is delpoyed in another namespace.</p>
<p>This is my yaml file for opentelemetry</p>
<pre><code>apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
  name: demo-otlcol-otlp
  namespace: otlcol-demo
spec:
  config: |
    receivers:
      otlp:
        protocols:
          grpc:
          http:
    processors:
      batch:

    exporters:
      logging:
        loglevel: info

      kafka:
        brokers: 
          - dev-kafka-kafka-brokers.kafka.svc.cluster.local:9092
        protocol_version: 3.4.0

    service:
      pipelines:
        traces:
          receivers: [otlp]
          processors: [batch]
          exporters: [logging,kafka]
  mode: daemonset
  resources: {}
  targetAllocator: {}
</code></pre>
<p>The error i'm getting is,</p>
<pre><code>Error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:
* error decoding 'exporters': unknown type: &quot;kafka&quot; for id: &quot;kafka&quot; (valid values: [logging otlp otlphttp jaeger])
2023/05/31 09:24:46 collector server run finished with error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:
* error decoding 'exporters': unknown type: &quot;kafka&quot; for id: &quot;kafka&quot; (valid values: [logging otlp otlphttp jaeger])
</code></pre>
<p>Can anyone explain how to use kafka in opentelemetry exporters</p>

<p>I can confirm what <a href="https://stackoverflow.com/users/396567/michael-hausenblas">Michael</a> said. Kafka is atm not supported and not part of Red Hats otel distro. <a href="https://github.com/os-observability/redhat-opentelemetry-collector/blob/52c064b83e0531809db6f5faf4057e127cadf5bd/manifest.yaml" rel="nofollow noreferrer">Here</a> you see what otel components will be productized in the next release. To bypass your issue, you can <a href="https://opentelemetry.io/docs/collector/distributions/" rel="nofollow noreferrer">create your own distro</a>. The easiest way would be to extend Red Hats <code>manifest.yaml</code> with the Kafka exporter. For testing, you can also use the contrib image offered by the OpenTelemetry community. There is a section in the OTEL CRD to overwrite the collector image.</p>
<p>Example:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
  name: simplest
spec:
  image: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.78.0
  config: ...
</code></pre>
