Skip to content

Conversation

@evanh
Copy link
Member

@evanh evanh commented Dec 11, 2025

Migrate to the arroyo producer (to capture accurate metrics) and also increase the buffer size of
the producer.

Migrate to the arroyo producer (to capture accurate metrics) and also increase the buffer size of
the producer.
@evanh evanh requested a review from a team as a code owner December 11, 2025 15:22
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 11, 2025
@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/eventstream/kafka/backend.py 80.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #104763      +/-   ##
===========================================
- Coverage   80.61%    80.54%   -0.07%     
===========================================
  Files        9419      9385      -34     
  Lines      403881    403624     -257     
  Branches    25637     25781     +144     
===========================================
- Hits       325572    325099     -473     
- Misses      77840     78090     +250     
+ Partials      469       435      -34     

)
)
except Exception as error:
logger.exception("Could not publish message: %s", error)
Copy link
Member

Choose a reason for hiding this comment

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

Wrt the if not asynchronous handling, I don't see a flush() method on the KafkaProducer. I think we want to do produce_future.result() to block until delivery completes instead.

return self.__producers[topic]

def delivery_callback(self, error: KafkaError | None, message: KafkaMessage) -> None:
def delivery_callback(self, error: KafkaError | None, value: bytes) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

Same as Sentry bot - should we handle when value is None?

And I think we can update the error type to BaseException.

@getsantry
Copy link
Contributor

getsantry bot commented Jan 10, 2026

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants