-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[exporter/kafka] Kafka exporter blocks collector pipeline with continuous retries when a configuration error occurs #38604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Is there a function to calculate the size of kafka messages after batch? I configured max_message_bytes 10000000, but it always exceeds 10M and fails after batch. How should I configure it so as not to exceed the max value? Automatically calculate batch size so as not to exceed MaxMessageBytes.
|
AFAIK there is no such functionality in OTEL Collection #36982 . it's under development at the moment #37176 . Nevertheless, this issues is not only about this case. As I mentioned in the cr, the Sarama client can fail to send a message with a Configuration Error. This kind of error is idempotent and there is no sense to perform retries for this kind of errors. |
…prevent retries (#38608) #### Description This fix unifies message send error handling for all types of telemetry. It is designed to identify whether the error was caused by a ConfigurationError and then reclassify it as a permanent consumer error to prevent further retries. #### Link to tracking issue #38604 #### Testing Unit test coverage added #### Documentation No changes Co-authored-by: Antoine Toulme <[email protected]> Co-authored-by: Sean Marciniak <[email protected]>
…prevent retries (open-telemetry#38608) #### Description This fix unifies message send error handling for all types of telemetry. It is designed to identify whether the error was caused by a ConfigurationError and then reclassify it as a permanent consumer error to prevent further retries. #### Link to tracking issue open-telemetry#38604 #### Testing Unit test coverage added #### Documentation No changes Co-authored-by: Antoine Toulme <[email protected]> Co-authored-by: Sean Marciniak <[email protected]>
Component(s)
exporter/kafka
What happened?
Description
The Kafka exporter should not perform retries on Sarama configuration errors. There is no point in retries, as each retry will result in the same configuration error and ultimately block the collector's pipeline.
From the message producer's perspective, as of version
[email protected]
, configuration errors occur in the following cases:Producer.MaxMessageBytes
.Steps to Reproduce
Configure pipeline with Batch processor having
batch_size: 25000
andtimeout: 1m
Configure Kafka exporter having
retry_on_failure.enabled: true
andproducer.max_message_bytes: 100000
Have a constant telemetry flow
Expected Result
The telemetry batch should be dropped, and a corresponding error message should be logged when this issue occurs. The Kafka exporter should still be able to perform retries for other errors, such as network timeouts, etc.
Actual Result
The Kafka exporter performs numerous retries while adhering to the
retry_on_failure
options. The reason for retry is a configuration error: "Attempt to produce message larger than configured Producer.MaxMessageBytes"Collector version
v0.121.0
Environment information
No response
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: