1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +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; if (this.flagResolver.isEnabled('webhookDomainLogging')) {
this.logger.info(`Webhook invoked`, { const domain = new URL(url).hostname;
domain, this.logger.info(`Webhook invoked`, {
}); domain,
});
}
this.registerEvent({ this.registerEvent({
integrationId, integrationId,

View File

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

View File

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