Remove feature flag: registerFrontendClient #10023
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature Flag Removal: registerFrontendClient
This PR removes the
registerFrontendClient
feature flag from the codebase. The changes have been automatically applied using Henry, our automated flag removal assistant.Flag Value:
kept
The feature flag registerFrontendClient has been removed from the codebase. The
feature it controlled, which pertains to how frontend client SDKs register
themselves and report metrics, has been permanently enabled.
What was removed:
• The registerFrontendClient flag checks using useUiFlag in
frontend/src/component/application/ApplicationChart.tsx.
• The registerFrontendClient flag checks using this.flagResolver.isEnabled()
in:
• src/lib/features/frontend-api/frontend-api-service.ts
• src/lib/features/metrics/instance/metrics.ts
• The flag definition from src/lib/types/experimental.ts (both IFlagKey and the
flags object).
• The flag definition from frontend/src/interfaces/uiConfig.ts (UiFlags
interface).
• The flag from experimental configurations in:
• src/server-dev.ts
• src/test/e2e/api/admin/applications.e2e.test.ts
• src/lib/features/metrics/instance/metrics.test.ts
• An unused import for useUiFlag in
frontend/src/component/application/ApplicationChart.tsx.
• The registerFrontendClientEnabled variable in
frontend/src/component/application/ApplicationChart.tsx.
What was kept:
• The code paths that were executed when registerFrontendClient was true are
now the default behavior:
• In frontend/src/component/application/ApplicationChart.tsx, the logic to
display "Backend SDK" and "Frontend SDK" sections (if data exists) is now
always active, while the generic "SDK" section (previously shown when the
flag was false) has been removed.
• In src/lib/features/frontend-api/frontend-api-service.ts, frontend client
registration via clientInstanceService.registerFrontendClient() will occur
if metrics.instanceId and sdkVersion are present.
• In src/lib/features/metrics/instance/metrics.ts, frontend client
registration via clientInstanceService.registerFrontendClient() will occur
for applications with sdkType === 'frontend' and a valid sdkVersion.
Why these changes were made:
The registerFrontendClient feature has been deemed stable and beneficial, so the
decision was made to make it a permanent part of the application. Removing the
feature flag simplifies the codebase by eliminating conditional logic and dead
code paths associated with the "off" state of the flag. This improves
maintainability and readability.
Tokens: 46k sent, 2.9k received. Cost: $0.09 message, $0.09 session.
Applied edit to src/test/e2e/api/admin/applications.e2e.test.ts
Applied edit to src/server-dev.ts
Applied edit to src/lib/types/experimental.ts
Applied edit to frontend/src/component/application/ApplicationChart.tsx
Applied edit to src/lib/features/frontend-api/frontend-api-service.ts
Applied edit to frontend/src/interfaces/uiConfig.ts
Applied edit to src/lib/features/metrics/instance/metrics.ts
Applied edit to src/lib/features/metrics/instance/metrics.test.ts
Commit 4106a3a chore: remove registerFrontendClient flag, keep feature