Skip to content
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

feat(kafka): Report producer errors #677

Merged
merged 4 commits into from
Jul 27, 2020
Merged

Conversation

tonyo
Copy link
Contributor

@tonyo tonyo commented Jul 23, 2020

Currently, asynchronous errors (those happening after the event was queued) in the kafka producer are silently dropped. With this change, the goal is to report those errors to Sentry (or at least write them in the logs).

@tonyo tonyo marked this pull request as ready for review July 24, 2020 08:26
@tonyo tonyo requested a review from a team July 24, 2020 08:26
Copy link
Member

@jan-auer jan-auer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍪

type DeliveryOpaque = ();
fn delivery(&self, result: &DeliveryResult, _delivery_opaque: Self::DeliveryOpaque) {
if let Err((error, _message)) = result {
log::error!("callback producer error: {}", LogError(error));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Since this is logged in Sentry, maybe make this more verbose?

Suggested change
log::error!("callback producer error: {}", LogError(error));
log::error!("failed to produce message to kafka: {}", LogError(error));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, but I think we should include a hint that this callback was triggered asynchronously. What do you think about now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, missed your question earlier. Yeah, looks good now!

@tonyo tonyo merged commit d12cbe1 into master Jul 27, 2020
@tonyo tonyo deleted the feat/report-producer-errors branch July 27, 2020 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants