Skip to content

Commit

Permalink
feat(deployment): add context to top up error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrishajev committed Dec 9, 2024
1 parent 70abd0d commit d8ab845
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class TopUpCustodialDeploymentsService implements DeploymentsRefiller {
await Promise.all(
grants.map(async grant => {
await this.errorService.execWithErrorHandler(
{ grant, event: "TOP_UP_ERROR" },
{ context: TopUpCustodialDeploymentsService.name, grant, event: "TOP_UP_ERROR" },
() => this.topUpForGrant(grant, client, options, summary),
() => summary.inc("walletsTopUpErrorCount")
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class TopUpManagedDeploymentsService implements DeploymentsRefiller {
});

summary.set("endBlockHeight", await this.blockHttpService.getCurrentHeight());
this.logger.info({ event: "TOP_UP_SUMMARY", summary: summary.summarize(), dryRun: options.dryRun });
this.logger.info({ context: TopUpManagedDeploymentsService.name, event: "TOP_UP_SUMMARY", summary: summary.summarize(), dryRun: options.dryRun });
}

private async topUpForWallet(wallet: UserWalletOutput, options: TopUpDeploymentsOptions, summary: TopUpSummarizer) {
Expand Down

0 comments on commit d8ab845

Please sign in to comment.