From 684498461021fd679672e5337b6e48c849c938bb Mon Sep 17 00:00:00 2001 From: "gitar-bot[bot]" <159877585+gitar-bot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:54:28 +0200 Subject: [PATCH] [Gitar] Cleaning up stale flag: trackLifecycleMetrics with value false (#8833) [![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.ai) This automated PR permanently removes the `trackLifecycleMetrics` feature flag. --- This automated PR was generated by [Gitar](https://gitar.ai). View [docs](https://gitar.ai/docs). Co-authored-by: Gitar --- .../feature-lifecycle/feature-lifecycle-service.ts | 13 ------------- src/lib/metrics.ts | 5 ----- src/lib/types/experimental.ts | 5 ----- 3 files changed, 23 deletions(-) diff --git a/src/lib/features/feature-lifecycle/feature-lifecycle-service.ts b/src/lib/features/feature-lifecycle/feature-lifecycle-service.ts index 6aecea869d66..dd0f8d886571 100644 --- a/src/lib/features/feature-lifecycle/feature-lifecycle-service.ts +++ b/src/lib/features/feature-lifecycle/feature-lifecycle-service.ts @@ -132,21 +132,8 @@ export class FeatureLifecycleService { } private recordStagesEntered(newlyEnteredStages: NewStage[]) { - if ( - this.flagResolver.isEnabled('trackLifecycleMetrics') && - newlyEnteredStages.length > 0 - ) { - this.logger.info( - `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 ${JSON.stringify({ stage, feature })}`, - ); - } }); } diff --git a/src/lib/metrics.ts b/src/lib/metrics.ts index deabf8711988..af421a429d47 100644 --- a/src/lib/metrics.ts +++ b/src/lib/metrics.ts @@ -672,11 +672,6 @@ export function registerPrometheusMetrics( eventBus.on( events.STAGE_ENTERED, (entered: { stage: string; feature: string }) => { - if (flagResolver.isEnabled('trackLifecycleMetrics')) { - logger.info( - `STAGE_ENTERED listened ${JSON.stringify(entered)}`, - ); - } featureLifecycleStageEnteredCounter.increment({ stage: entered.stage, }); diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 795494cf5540..8dc220f4e2b9 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -49,7 +49,6 @@ export type IFlagKey = | 'removeUnsafeInlineStyleSrc' | 'onboardingUI' | 'projectRoleAssignment' - | 'trackLifecycleMetrics' | 'purchaseAdditionalEnvironments' | 'originMiddlewareRequestLogging' | 'unleashAI' @@ -246,10 +245,6 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_PROJECT_ROLE_ASSIGNMENT, false, ), - trackLifecycleMetrics: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_TRACK_LIFECYCLE_METRICS, - false, - ), purchaseAdditionalEnvironments: parseEnvVarBoolean( process.env.UNLEASH_EXPERIMENTAL_PURCHASE_ADDITIONAL_ENVIRONMENTS, false,