From 31742f8638107887f0c1fdb51b7ff566d885639d Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Thu, 24 Nov 2022 17:19:28 +0100 Subject: [PATCH] Pass task name into item metrics, not task object --- src/kernel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel.js b/src/kernel.js index 9875c44..11fb7d0 100644 --- a/src/kernel.js +++ b/src/kernel.js @@ -80,10 +80,10 @@ module.exports = async function createKernel(_configuration) { simpleSink(({ status }) => { if (status === "completed") { metrics.successfulItems.inc(1); - metrics.successfulItems.labels({ task: task }).inc(1); + metrics.successfulItems.labels({ task: task.name }).inc(1); } else if (status === "failed") { metrics.failedItems.inc(1); - metrics.failedItems.labels({ task: task }).inc(1); + metrics.failedItems.labels({ task: task.name }).inc(1); } else { unreachable(`Unrecognized status '${status}'`); }