Files
klz-cables.com/.pnpm-store/v10/files/cc/c4964797da3bdc486df004c3b64ee76be5f848e75724c2dac8bee6595c12d2c3be3dae54de9a26b559c64bc4d6e76bfa2664582069098e8814eefb90a66b23
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

45 lines
1.5 KiB
Plaintext

import { defineIntegration } from '../../integration.js';
import { _INTERNAL_insertFlagToScope, _INTERNAL_addFeatureFlagToActiveSpan, _INTERNAL_copyFlagsFromScopeToEvent } from '../../utils/featureFlags.js';
/**
* Sentry integration for buffering feature flag evaluations manually with an API, and
* capturing them on error events and spans.
*
* 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 { type FeatureFlagsIntegration } from '@sentry/browser';
*
* // Setup
* Sentry.init(..., integrations: [Sentry.featureFlagsIntegration()])
*
* // Verify
* const flagsIntegration = Sentry.getClient()?.getIntegrationByName<FeatureFlagsIntegration>('FeatureFlags');
* if (flagsIntegration) {
* flagsIntegration.addFeatureFlag('my-flag', true);
* } else {
* // check your setup
* }
* Sentry.captureException(Exception('broke')); // 'my-flag' should be captured to this Sentry event.
* ```
*/
const featureFlagsIntegration = defineIntegration(() => {
return {
name: 'FeatureFlags',
processEvent(event, _hint, _client) {
return _INTERNAL_copyFlagsFromScopeToEvent(event);
},
addFeatureFlag(name, value) {
_INTERNAL_insertFlagToScope(name, value);
_INTERNAL_addFeatureFlagToActiveSpan(name, value);
},
};
}) ;
export { featureFlagsIntegration };
//# sourceMappingURL=featureFlagsIntegration.js.map