@sentry/browser
Version:
Official Sentry SDK for browsers
26 lines (25 loc) • 886 B
JavaScript
let _sentry_core = require("@sentry/core");
// src/integrations/featureFlags/growthbook/integration.ts
/**
* Sentry integration for capturing feature flag evaluations from GrowthBook.
*
* See the feature flag documentation: https://develop.sentry.dev/sdk/expected-features/#feature-flags
*
* @example
* ```
* import { GrowthBook } from '@growthbook/growthbook';
* import * as Sentry from '@sentry/browser';
*
* Sentry.init({
* dsn: '___PUBLIC_DSN___',
* integrations: [Sentry.growthbookIntegration({ growthbookClass: GrowthBook })],
* });
*
* const gb = new GrowthBook();
* gb.isOn('my-feature');
* Sentry.captureException(new Error('something went wrong'));
* ```
*/
const growthbookIntegration = (({ growthbookClass }) => (0, _sentry_core.growthbookIntegration)({ growthbookClass }));
exports.growthbookIntegration = growthbookIntegration;
//# sourceMappingURL=integration.js.map