1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

chore: add feature flag for request counting inside Unleash (#6164)

## About the changes

Adds the feature flag for use in request traffic counting
This commit is contained in:
David Leek 2024-02-08 14:46:54 +01:00 committed by GitHub
parent ecc200bf8a
commit bb2f88980c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -79,6 +79,7 @@ exports[`should create default config 1`] = `
"caseInsensitiveInOperators": false,
"celebrateUnleash": false,
"changeRequestConflictHandling": false,
"collectTrafficDataUsage": false,
"createdByUserIdDataMigration": false,
"customRootRolesKillSwitch": false,
"demo": false,

View File

@ -48,6 +48,7 @@ export type IFlagKey =
| 'createdByUserIdDataMigration'
| 'showInactiveUsers'
| 'inMemoryScheduledChangeRequests'
| 'collectTrafficDataUsage'
| 'useMemoizedActiveTokens';
export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;
@ -237,6 +238,10 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_IN_MEMORY_SCHEDULED_CHANGE_REQUESTS,
false,
),
collectTrafficDataUsage: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_COLLECT_TRAFFIC_DATA_USAGE,
false,
),
};
export const defaultExperimentalOptions: IExperimentalOptions = {