From da4acd07f57782ce9247ddc9ba4e026069088050 Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Mon, 7 Oct 2024 14:54:53 +0300 Subject: [PATCH] chore: update debugging lifecycle format (#8371) --- .../feature-lifecycle/feature-lifecycle-service.ts | 7 ++++--- src/lib/metrics.ts | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/features/feature-lifecycle/feature-lifecycle-service.ts b/src/lib/features/feature-lifecycle/feature-lifecycle-service.ts index 2d05c58089..5fc8e136d2 100644 --- a/src/lib/features/feature-lifecycle/feature-lifecycle-service.ts +++ b/src/lib/features/feature-lifecycle/feature-lifecycle-service.ts @@ -134,14 +134,15 @@ export class FeatureLifecycleService { private recordStagesEntered(newlyEnteredStages: NewStage[]) { if (this.flagResolver.isEnabled('trackLifecycleMetrics')) { this.logger.info( - 'recordStagesEntered parameter', - newlyEnteredStages, + `recordStagesEntered parameter ${JSON.stringify(newlyEnteredStages)}`, ); } newlyEnteredStages.forEach(({ stage, feature }) => { this.eventBus.emit(STAGE_ENTERED, { stage, feature }); if (this.flagResolver.isEnabled('trackLifecycleMetrics')) { - this.logger.info('STAGE_ENTERED emitted', { stage, feature }); + this.logger.info( + `STAGE_ENTERED emitted ${JSON.stringify({ stage, feature })}`, + ); } }); } diff --git a/src/lib/metrics.ts b/src/lib/metrics.ts index 25c1ab8557..6a8c973073 100644 --- a/src/lib/metrics.ts +++ b/src/lib/metrics.ts @@ -454,7 +454,9 @@ export default class MetricsMonitor { events.STAGE_ENTERED, (entered: { stage: string; feature: string }) => { if (flagResolver.isEnabled('trackLifecycleMetrics')) { - logger.info('STAGE_ENTERED listened', entered); + logger.info( + `STAGE_ENTERED listened ${JSON.stringify(entered)}`, + ); } featureLifecycleStageEnteredCounter.increment({ stage: entered.stage,