Skip to content

Instantly share code, notes, and snippets.

@Apurer
Created November 5, 2025 22:22
Show Gist options
  • Select an option

  • Save Apurer/b9c877994bb968611123074a512e064a to your computer and use it in GitHub Desktop.

Select an option

Save Apurer/b9c877994bb968611123074a512e064a to your computer and use it in GitHub Desktop.
receivers:
otlp:
protocols:
http:
endpoint: "0.0.0.0:4318"
processors:
batch:
timeout: 5s
send_batch_size: 1000
exporters:
kafka:
brokers:
- "kafka-broker1:9093"
- "kafka-broker2:9093"
protocol_version: "2.8.0"
client_id: "otel-collector-logs"
logs:
topic: "otel_logs_topic"
encoding: otlp_proto
auth:
tls:
# Path to CA used to verify the Kafka broker server certificate
ca_file: /etc/otelcol/certs/kafka-ca.crt
# Path to client cert for mTLS
cert_file: /etc/otelcol/certs/client.crt
# Path to client private key
key_file: /etc/otelcol/certs/client.key
# If the broker uses a hostname not matching the cert CN then override
server_name: kafka-broker1.my.domain
service:
pipelines:
logs:
receivers: [otlp]
processors: [batch]
exporters: [kafka]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment