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 Nov 27, 2024
1 parent ec70124 commit c5fd695
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 48 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 @@ -48,7 +48,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
48 changes: 2 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c5fd695

Please sign in to comment.