mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 16:14:02 +00:00
worker: Check if Sentry is initialized before calling add_breadcrumb.
Otherwise we get spammed with “Dropped breadcrumb because no client bound” log messages. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
e4a2695f54
commit
e8faa4a029
@@ -173,11 +173,15 @@ class QueueProcessingWorker(ABC):
|
||||
name=f"consume {self.queue_name}",
|
||||
custom_sampling_context={"queue": self.queue_name},
|
||||
):
|
||||
if sentry_sdk.is_initialized():
|
||||
sentry_sdk.add_breadcrumb(
|
||||
type="debug",
|
||||
category="queue_processor",
|
||||
message=f"Consuming {self.queue_name}",
|
||||
data={"events": events, "local_queue_size": self.get_remaining_local_queue_size()},
|
||||
data={
|
||||
"events": events,
|
||||
"local_queue_size": self.get_remaining_local_queue_size(),
|
||||
},
|
||||
)
|
||||
try:
|
||||
if self.idle:
|
||||
|
Reference in New Issue
Block a user