Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 2 additions & 20 deletions frontend/src/component/application/ApplicationChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import WarningAmberRounded from '@mui/icons-material/WarningAmberRounded';
import { TimeAgo } from 'component/common/TimeAgo/TimeAgo';
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
import { getApplicationIssues } from './ApplicationIssues/ApplicationIssues.tsx';
import { useUiFlag } from 'hooks/useUiFlag';

const StyledTable = styled('table')(({ theme }) => ({
fontSize: theme.fontSizes.smallerBody,
Expand Down Expand Up @@ -197,7 +196,6 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
const { elementRef, width } = useElementWidth();
const navigate = useNavigate();
const theme = useTheme();
const registerFrontendClientEnabled = useUiFlag('registerFrontendClient');

const mode = getApplicationIssues(data);

Expand Down Expand Up @@ -296,23 +294,8 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
{environment.instanceCount}
</StyledCell>
</tr>
{!registerFrontendClientEnabled ? (
<tr>
<StyledCell>SDK:</StyledCell>
<StyledCell>
{environment.sdks.map(
(sdk) => (
<div key={sdk}>
{sdk}
</div>
),
)}
</StyledCell>
</tr>
) : null}

{registerFrontendClientEnabled &&
environment.backendSdks.length > 0 ? (
{environment.backendSdks.length > 0 ? (
<tr>
<StyledCell>
Backend SDK:
Expand All @@ -329,8 +312,7 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
</tr>
) : null}

{registerFrontendClientEnabled &&
environment.frontendSdks.length > 0 ? (
{environment.frontendSdks.length > 0 ? (
<tr>
<StyledCell>
Frontend SDK:
Expand Down
1 change: 0 additions & 1 deletion frontend/src/interfaces/uiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export type UiFlags = {
showUserDeviceCount?: boolean;
consumptionModel?: boolean;
edgeObservability?: boolean;
registerFrontendClient?: boolean;
customMetrics?: boolean;
lifecycleMetrics?: boolean;
createFlagDialogCache?: boolean;
Expand Down
6 changes: 1 addition & 5 deletions src/lib/features/frontend-api/frontend-api-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,7 @@ export class FrontendApiService {
ip,
);

if (
metrics.instanceId &&
typeof sdkVersion === 'string' &&
this.flagResolver.isEnabled('registerFrontendClient')
) {
if (metrics.instanceId && typeof sdkVersion === 'string') {
const client = {
appName: metrics.appName,
instanceId: metrics.instanceId,
Expand Down
8 changes: 1 addition & 7 deletions src/lib/features/metrics/instance/metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,7 @@ let services: IUnleashServices;
let destroy: () => Promise<void>;

beforeAll(async () => {
const setup = await getSetup({
experimental: {
flags: {
registerFrontendClient: true,
},
},
});
const setup = await getSetup({});
request = setup.request;
stores = setup.stores;
destroy = setup.destroy;
Expand Down
22 changes: 8 additions & 14 deletions src/lib/features/metrics/instance/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,20 +226,14 @@ export default class ClientMetricsController extends Controller {
app.sdkType === 'frontend' &&
typeof app.sdkVersion === 'string'
) {
if (
this.flagResolver.isEnabled(
'registerFrontendClient',
)
) {
this.clientInstanceService.registerFrontendClient({
appName: app.appName,
instanceId: app.instanceId,
environment: app.environment,
sdkType: app.sdkType,
sdkVersion: app.sdkVersion,
projects: app.projects,
});
}
this.clientInstanceService.registerFrontendClient({
appName: app.appName,
instanceId: app.instanceId,
environment: app.environment,
sdkType: app.sdkType,
sdkVersion: app.sdkVersion,
projects: app.projects,
});
} else {
promises.push(
this.clientInstanceService.registerBackendClient(
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 @@ -55,7 +55,6 @@ export type IFlagKey =
| 'uniqueSdkTracking'
| 'consumptionModel'
| 'edgeObservability'
| 'registerFrontendClient'
| 'reportUnknownFlags'
| 'lastSeenBulkQuery'
| 'lifecycleMetrics'
Expand Down Expand Up @@ -264,10 +263,6 @@ const flags: IFlags = {
process.env.EXPERIMENTAL_EDGE_OBSERVABILITY,
false,
),
registerFrontendClient: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_REGISTER_FRONTEND_CLIENT,
false,
),
reportUnknownFlags: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_REPORT_UNKNOWN_FLAGS,
false,
Expand Down
1 change: 0 additions & 1 deletion src/server-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ process.nextTick(async () => {
deltaApi: true,
uniqueSdkTracking: true,
strictSchemaValidation: true,
registerFrontendClient: true,
reportUnknownFlags: true,
customMetrics: true,
lifecycleMetrics: true,
Expand Down
Loading