1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

chore: update debugging lifecycle format (#8371)

This commit is contained in:
Jaanus Sellin 2024-10-07 14:54:53 +03:00 committed by sjaanus
parent e512739571
commit da4acd07f5
No known key found for this signature in database
GPG Key ID: 20E007C0248BA7FF
2 changed files with 7 additions and 4 deletions

View File

@ -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 })}`,
);
}
});
}

View File

@ -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,