Pass task name into item metrics, not task object

master
Sven Slootweg 2 years ago
parent f7cd69d7d0
commit 31742f8638

@ -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}'`);
}

Loading…
Cancel
Save