Skip to content

Commit b813f6e

Browse files
authored
chore(taskworker): Update put child multiprocessing queue metric (#93744)
There are two places we add an inflight task to the child queue. This PR makes sure that the metric gets captures in both places.
1 parent 2d6bf0d commit b813f6e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sentry/taskworker/worker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,13 @@ def _send_result(self, result: ProcessingResult, fetch: bool = True) -> bool:
217217
next = self._send_update_task(result, fetch_next)
218218
if next:
219219
try:
220+
start_time = time.monotonic()
220221
self._child_tasks.put(next)
222+
metrics.distribution(
223+
"taskworker.worker.child_task.put.duration",
224+
time.monotonic() - start_time,
225+
tags={"processing_pool": self._processing_pool_name},
226+
)
221227
except queue.Full:
222228
logger.warning(
223229
"taskworker.send_result.child_task_queue_full",

0 commit comments

Comments
 (0)