From e1dbcadc659f78c364d61da19fe589d4f2dad82a Mon Sep 17 00:00:00 2001 From: Yaroslav Grishajev Date: Tue, 26 Nov 2024 16:06:45 +0100 Subject: [PATCH] feat(deployment): add context to top up error logging --- .../top-up-custodial-deployments.service.ts | 2 +- .../top-up-managed-deployments.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/src/deployment/services/top-up-custodial-deployments/top-up-custodial-deployments.service.ts b/apps/api/src/deployment/services/top-up-custodial-deployments/top-up-custodial-deployments.service.ts index 53f021bbe..a4a221bff 100644 --- a/apps/api/src/deployment/services/top-up-custodial-deployments/top-up-custodial-deployments.service.ts +++ b/apps/api/src/deployment/services/top-up-custodial-deployments/top-up-custodial-deployments.service.ts @@ -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") ); diff --git a/apps/api/src/deployment/services/top-up-managed-deployments/top-up-managed-deployments.service.ts b/apps/api/src/deployment/services/top-up-managed-deployments/top-up-managed-deployments.service.ts index bd8572510..abf39651e 100644 --- a/apps/api/src/deployment/services/top-up-managed-deployments/top-up-managed-deployments.service.ts +++ b/apps/api/src/deployment/services/top-up-managed-deployments/top-up-managed-deployments.service.ts @@ -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) {