-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
Description
Component(s)
exporter/kafka
What happened?
Description
The Kafka Exporter configuration syntax:
auth:
tls:
......was deprecated in v0.124.0, in favor of:
tls:
...The Sarama Kafka client accepts both syntaxes, but the franz-go client ignores the deprecated syntax and silently falls back to a non-TLS connection.
Steps to Reproduce
- Set up a TLS-enabled Kafka broker
- Run otel-collector with the attached configuration file
- Wait 30 seconds
Expected Result
otel-collector metrics published to the mytopic topic, and the log should show something like:
2025-09-17T19:27:17.262-0400 debug [email protected]/kafka_exporter.go:176 kafka records exported {"resource": {"service.instance.id": "55555555-5555-5555-5555-555555555555", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "otelcol.component.id": "kafka", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "records": 1, "topic": "mytopic"}
2025-09-17T19:27:28.683-0400 debug franz [email protected]/kzap.go:110 reaped connections {"resource": {"service.instance.id": "55555555-5555-5555-5555-555555555555", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "otelcol.component.id": "kafka", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "time_since_last_reap": 19.9999845, "reap_dur": 0.000564291, "num_reaped": 1}
Actual Result
No otel-collector metrics published to the mytopic topic, and the log shows "err": "EOF" errors:
d": "kafka", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "broker": "seed_0", "bytes_read": 0, "read_wait": 0.000055792, "time_to_read": 0.1213485, "err": "EOF"}
2025-09-17T19:22:34.709-0400 debug franz [email protected]/kzap.go:110 connection initialization failed {"resource": {"service.instance.id": "55555555-5555-5555-5555-555555555555", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "otelcol.component.id": "kafka", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "addr": "localhost:9092", "broker": "seed_0", "err": "EOF"}
2025-09-17T19:22:34.709-0400 info franz [email protected]/kzap.go:114 new topic metadata wait failed, retrying wait {"resource": {"service.instance.id": "55555555-5555-5555-5555-555555555555", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "otelcol.component.id": "kafka", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "topic": "mytopic", "err": "EOF"}
2025-09-17T19:22:34.959-0400 info franz [email protected]/kzap.go:114 metadata update triggered {"resource": {"service.instance.id": "55555555-5555-5555-5555-555555555555", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "otelcol.component.id": "kafka", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "why": "re-updating metadata due to err: EOF"}
Collector version
v0.135.0
Environment information
Environment
OS: macOS Sequoia 15.5, Ubuntu 22.04,
Compiler: 1.24.7
OpenTelemetry Collector configuration
receivers:
prometheus/otel:
config:
scrape_configs:
- job_name: otel
scrape_interval: 15s
static_configs:
- targets:
- 0.0.0.0:8888
exporters:
kafka:
protocol_version: 2.1.0
encoding: otlp_proto
topic: mytopic
brokers:
- localhost:9092
auth:
tls:
ca_file: ca_chain.pem
cert_file: certificate.pem
key_file: private_key.pem
service:
telemetry:
logs:
level: "debug"
pipelines:
metrics:
receivers:
- prometheus/otel
exporters:
- kafkaLog output
d": "kafka", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "broker": "seed_0", "bytes_read": 0, "read_wait": 0.000055792, "time_to_read": 0.1213485, "err": "EOF"}
2025-09-17T19:22:34.709-0400 debug franz [email protected]/kzap.go:110 connection initialization failed {"resource": {"service.instance.id": "55555555-5555-5555-5555-555555555555", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "otelcol.component.id": "kafka", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "addr": "localhost:9092", "broker": "seed_0", "err": "EOF"}
2025-09-17T19:22:34.709-0400 info franz [email protected]/kzap.go:114 new topic metadata wait failed, retrying wait {"resource": {"service.instance.id": "55555555-5555-5555-5555-555555555555", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "otelcol.component.id": "kafka", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "topic": "mytopic", "err": "EOF"}
2025-09-17T19:22:34.959-0400 info franz [email protected]/kzap.go:114 metadata update triggered {"resource": {"service.instance.id": "55555555-5555-5555-5555-555555555555", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "otelcol.component.id": "kafka", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "why": "re-updating metadata due to err: EOF"}Additional context
No response
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.