1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-28 19:06:12 +01:00

chore: flag for webhook domain logging (#8413)

This commit is contained in:
David Leek 2024-10-10 13:23:52 +02:00 committed by GitHub
parent a5cfd2e80e
commit b1cdde0c6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 5 deletions

View File

@ -111,10 +111,12 @@ export default class Webhook extends Addon {
});
}
const domain = new URL(url).hostname;
this.logger.info(`Webhook invoked`, {
domain,
});
if (this.flagResolver.isEnabled('webhookDomainLogging')) {
const domain = new URL(url).hostname;
this.logger.info(`Webhook invoked`, {
domain,
});
}
this.registerEvent({
integrationId,

View File

@ -62,7 +62,8 @@ export type IFlagKey =
| 'personalDashboardUI'
| 'trackLifecycleMetrics'
| 'purchaseAdditionalEnvironments'
| 'unleashAI';
| 'unleashAI'
| 'webhookDomainLogging';
export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;
@ -307,6 +308,10 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_UNLEASH_AI,
false,
),
webhookDomainLogging: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENT_WEBHOOK_DOMAIN_LOGGING,
false,
),
};
export const defaultExperimentalOptions: IExperimentalOptions = {

View File

@ -57,6 +57,7 @@ process.nextTick(async () => {
personalDashboardUI: true,
purchaseAdditionalEnvironments: true,
unleashAI: true,
webhookDomainLogging: true,
},
},
authentication: {