Skip to content

Commit

Permalink
[Gitar] Cleaning up stale flag: trackLifecycleMetrics with value false (
Browse files Browse the repository at this point in the history
#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 <noreply@gitar.ai>
  • Loading branch information
gitar-bot[bot] and Gitar authored Nov 22, 2024
1 parent 0e7b675 commit 6844984
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 23 deletions.
13 changes: 0 additions & 13 deletions src/lib/features/feature-lifecycle/feature-lifecycle-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })}`,
);
}
});
}

Expand Down
5 changes: 0 additions & 5 deletions src/lib/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down
5 changes: 0 additions & 5 deletions src/lib/types/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export type IFlagKey =
| 'removeUnsafeInlineStyleSrc'
| 'onboardingUI'
| 'projectRoleAssignment'
| 'trackLifecycleMetrics'
| 'purchaseAdditionalEnvironments'
| 'originMiddlewareRequestLogging'
| 'unleashAI'
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 6844984

Please sign in to comment.