@sentry/node
Version:
Sentry Node SDK using OpenTelemetry for performance instrumentation
36 lines (35 loc) • 992 B
JavaScript
import { consoleSandbox, defineIntegration, isBrowser } from "@sentry/core";
// src/integrations/featureFlagShims/openFeature.ts
/**
* This is a shim for the OpenFeature integration.
* We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.
*/
const openFeatureIntegrationShim = defineIntegration((_options) => {
if (!isBrowser()) consoleSandbox(() => {
console.warn("The openFeatureIntegration() can only be used in the browser.");
});
return { name: "OpenFeature" };
});
/**
* This is a shim for the OpenFeature integration hook.
*/
var OpenFeatureIntegrationHookShim = class {
/**
*
*/
constructor() {
if (!isBrowser()) consoleSandbox(() => {
console.warn("The OpenFeatureIntegrationHook can only be used in the browser.");
});
}
/**
*
*/
after() {}
/**
*
*/
error() {}
};
export { OpenFeatureIntegrationHookShim, openFeatureIntegrationShim };
//# sourceMappingURL=openFeature.js.map