Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gitar] Cleaning up stale flag: responseTimeWithAppNameKillSwitch with value true #827

Closed
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
1 change: 0 additions & 1 deletion src/lib/__snapshots__/create-config.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ exports[`should create default config 1`] = `
"removeUnsafeInlineStyleSrc": false,
"resourceLimits": false,
"responseTimeMetricsFix": false,
"responseTimeWithAppNameKillSwitch": false,
"showInactiveUsers": false,
"signals": false,
"strictSchemaValidation": false,
Expand Down
8 changes: 0 additions & 8 deletions src/lib/middleware/response-time-metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type { InstanceStatsService } from '../services';
import type { RequestHandler } from 'express';

const _responseTime = responseTime.default;
const appNameReportingThreshold = 1000;

export const storeRequestedRoute: RequestHandler = (req, res, next) => {
if (req.route) {
Expand Down Expand Up @@ -55,13 +54,6 @@ export function responseTimeMetrics(
// when pathname is undefined use a fallback
pathname = pathname ?? collapse(req.path);
let appName: string | undefined;
if (
!flagResolver.isEnabled('responseTimeWithAppNameKillSwitch') &&
(instanceStatsService.getAppCountSnapshot('7d') ??
appNameReportingThreshold) < appNameReportingThreshold
) {
appName = req.headers['unleash-appname'] ?? req.query.appName;
}

const timingInfo = {
path: pathname,
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 @@ -10,7 +10,6 @@ export type IFlagKey =
| 'enableLicenseChecker'
| 'embedProxy'
| 'embedProxyFrontend'
| 'responseTimeWithAppNameKillSwitch'
| 'maintenanceMode'
| 'messageBanner'
| 'featuresExportImport'
Expand Down Expand Up @@ -83,10 +82,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_EMBED_PROXY_FRONTEND,
true,
),
responseTimeWithAppNameKillSwitch: parseEnvVarBoolean(
process.env.UNLEASH_RESPONSE_TIME_WITH_APP_NAME_KILL_SWITCH,
false,
),
maintenanceMode: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_MAINTENANCE_MODE,
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 @@ -39,7 +39,6 @@ process.nextTick(async () => {
embedProxy: true,
embedProxyFrontend: true,
anonymiseEventLog: false,
responseTimeWithAppNameKillSwitch: false,
stripHeadersOnAPI: true,
celebrateUnleash: true,
featureSearchFeedbackPosting: true,
Expand Down
Loading