druid icon indicating copy to clipboard operation
druid copied to clipboard

Emit task metrics on all task completions.

Open gianm opened this issue 1 month ago • 0 comments

Previously, "emitTaskCompletionLogsAndMetrics" would emit the metrics task/run/time, task/success/count, and task/failed/count only for tasks that complete due to an attached runner callback (from attachCallbacks). This patch causes metrics to be emitted whenever notifyStatus successfully marks a task as completed, which covers a wider variety of scenarios.

The prior behavior missed scenarios where the shutdown API is used on a task that the runner is aware of but has not yet been added to the queue. It could happen during Overlord startup, while the queue is initializing.

gianm avatar Nov 21 '25 00:11 gianm