Skip to content

Commit

Permalink
common: include action and allocation IDs on logs for IE053
Browse files Browse the repository at this point in the history
  • Loading branch information
tilacog committed May 16, 2023
1 parent 9c20e03 commit 7ebf16d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/indexer-common/src/allocations/query-fees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class AllocationReceiptCollector implements ReceiptCollector {
})

try {
logger.debug(`Queue allocation receipts for collecting`)
logger.debug(`Queue allocation receipts for collecting`, { actionID, allocation })

const now = new Date()

Expand Down Expand Up @@ -191,7 +191,7 @@ export class AllocationReceiptCollector implements ReceiptCollector {
receipts.length,
)
if (receipts.length <= 0) {
logger.debug(`No receipts to collect for allocation`)
logger.debug(`No receipts to collect for allocation`, { actionID, allocation })
return false
}

Expand All @@ -205,13 +205,17 @@ export class AllocationReceiptCollector implements ReceiptCollector {
logger.info(`Successfully queued allocation receipts for collecting`, {
receipts: receipts.length,
timeout: new Date(timeout).toLocaleString(),
actionID,
allocation,
})
return true
} catch (err) {
const error = indexerError(IndexerErrorCode.IE053, err)
this.metrics.failedReceipts.inc({ allocation: allocation.id })
this.logger.error(`Failed to queue allocation receipts for collecting`, {
error,
actionID,
allocation,
})
throw error
}
Expand Down

0 comments on commit 7ebf16d

Please sign in to comment.