Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
sentry: More gracefully handle a value of 0.
Alex Vandiver5f3d6ac98337
diff --git a/zproject/sentry.py b/zproject/sentry.pyindex 71c1a50c7c1..73f942edd66 100644--- a/zproject/sentry.py+++ b/zproject/sentry.py@@ -55,10 +55,10 @@ def traces_sampler(sampling_context: Dict[str, Any]) -> Union[float, bool]:queue = sampling_context.get("queue")if queue is not None and isinstance(queue, str):- if isinstance(settings.SENTRY_TRACE_WORKER_RATE, float):- return settings.SENTRY_TRACE_WORKER_RATE- else:+ if isinstance(settings.SENTRY_TRACE_WORKER_RATE, dict):return settings.SENTRY_TRACE_WORKER_RATE.get(queue, 0.0)+ else:+ return settings.SENTRY_TRACE_WORKER_RATEelse:return settings.SENTRY_TRACE_RATE