Skip to content

Commit

Permalink
chore: update debugging lifecycle format (#8371)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus authored Oct 7, 2024
1 parent 942555b commit 93883b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 })}`,
);
}
});
}
Expand Down
4 changes: 3 additions & 1 deletion src/lib/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 93883b3

Please sign in to comment.