Files
klz-cables.com/.pnpm-store/v10/files/5b/1eeb322adebbe973475c687bc09602bee0208cc626a2d9d29267ef7e723b02b8a77dde0df953939d0b550c3636f0bbdcac321fc3ca99f39194f83dd6cd4305
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

56 lines
1.8 KiB
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
/**
* Sentry integration for capturing feature flag evaluations from LaunchDarkly.
*
* See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.
*
* @example
* ```
* import * as Sentry from '@sentry/browser';
* import {launchDarklyIntegration, buildLaunchDarklyFlagUsedInspector} from '@sentry/browser';
* import * as LaunchDarkly from 'launchdarkly-js-client-sdk';
*
* Sentry.init(..., integrations: [launchDarklyIntegration()])
* const ldClient = LaunchDarkly.initialize(..., {inspectors: [buildLaunchDarklyFlagUsedHandler()]});
* ```
*/
const launchDarklyIntegration = core.defineIntegration(() => {
return {
name: 'LaunchDarkly',
processEvent(event, _hint, _client) {
return core._INTERNAL_copyFlagsFromScopeToEvent(event);
},
};
}) ;
/**
* LaunchDarkly hook to listen for and buffer flag evaluations. This needs to
* be registered as an 'inspector' in LaunchDarkly initialize() options,
* separately from `launchDarklyIntegration`. Both the hook and the integration
* are needed to capture LaunchDarkly flags.
*/
function buildLaunchDarklyFlagUsedHandler() {
return {
name: 'sentry-flag-auditor',
type: 'flag-used',
synchronous: true,
/**
* Handle a flag evaluation by storing its name and value on the current scope.
*/
method: (flagKey, flagDetail, _context) => {
core._INTERNAL_insertFlagToScope(flagKey, flagDetail.value);
core._INTERNAL_addFeatureFlagToActiveSpan(flagKey, flagDetail.value);
},
};
}
exports.buildLaunchDarklyFlagUsedHandler = buildLaunchDarklyFlagUsedHandler;
exports.launchDarklyIntegration = launchDarklyIntegration;
//# sourceMappingURL=integration.js.map