From 019bf24ad55dd5fe9f4f86cea31587f8ab6533a2 Mon Sep 17 00:00:00 2001 From: Gabe Hamilton Date: Thu, 29 Jun 2023 12:40:15 -0600 Subject: [PATCH] Improved log message --- indexer-js-queue-handler/indexer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indexer-js-queue-handler/indexer.js b/indexer-js-queue-handler/indexer.js index 2e9089e57..faebaff20 100644 --- a/indexer-js-queue-handler/indexer.js +++ b/indexer-js-queue-handler/indexer.js @@ -39,11 +39,12 @@ export default class Indexer { for (const function_name in functions) { try { const indexerFunction = functions[function_name]; - console.log('Running function', function_name, ', lag in ms is: ', lag); // Lambda logs + const runningMessage = `Running function ${function_name}` + is_historical ? ' historical backfill' : `, lag is: ${lag}ms from block timestamp`; + console.log(runningMessage); // Lambda logs const segment = this.deps.awsXray.getSegment(); // segment is immutable, subsegments are mutable const functionSubsegment = segment.addNewSubsegment('indexer_function'); functionSubsegment.addAnnotation('indexer_function', function_name); - simultaneousPromises.push(this.writeLog(function_name, block_height, 'Running function', function_name, ', lag in ms is: ', lag)); + simultaneousPromises.push(this.writeLog(function_name, block_height, runningMessage)); simultaneousPromises.push(this.deps.metrics.putBlockHeight(indexerFunction.account_id, indexerFunction.function_name, block_height));