@sentry/browser 8.42.0 → 8.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/build/npm/cjs/eventbuilder.js +1 -0
  2. package/build/npm/cjs/eventbuilder.js.map +1 -1
  3. package/build/npm/cjs/index.js +10 -0
  4. package/build/npm/cjs/index.js.map +1 -1
  5. package/build/npm/cjs/integrations/browserapierrors.js +2 -2
  6. package/build/npm/cjs/integrations/browserapierrors.js.map +1 -1
  7. package/build/npm/cjs/integrations/browsersession.js +44 -0
  8. package/build/npm/cjs/integrations/browsersession.js.map +1 -0
  9. package/build/npm/cjs/integrations/featureFlags/featureFlagsIntegration.js +46 -0
  10. package/build/npm/cjs/integrations/featureFlags/featureFlagsIntegration.js.map +1 -0
  11. package/build/npm/cjs/integrations/featureFlags/launchdarkly/integration.js +55 -0
  12. package/build/npm/cjs/integrations/featureFlags/launchdarkly/integration.js.map +1 -0
  13. package/build/npm/cjs/integrations/featureFlags/openfeature/integration.js +37 -0
  14. package/build/npm/cjs/integrations/featureFlags/openfeature/integration.js.map +1 -0
  15. package/build/npm/cjs/integrations/globalhandlers.js +8 -4
  16. package/build/npm/cjs/integrations/globalhandlers.js.map +1 -1
  17. package/build/npm/cjs/integrations/httpclient.js +15 -4
  18. package/build/npm/cjs/integrations/httpclient.js.map +1 -1
  19. package/build/npm/cjs/integrations/reportingobserver.js.map +1 -1
  20. package/build/npm/cjs/sdk.js +12 -37
  21. package/build/npm/cjs/sdk.js.map +1 -1
  22. package/build/npm/cjs/utils/featureFlags.js +96 -0
  23. package/build/npm/cjs/utils/featureFlags.js.map +1 -0
  24. package/build/npm/esm/eventbuilder.js +1 -0
  25. package/build/npm/esm/eventbuilder.js.map +1 -1
  26. package/build/npm/esm/index.js +4 -0
  27. package/build/npm/esm/index.js.map +1 -1
  28. package/build/npm/esm/integrations/browserapierrors.js +2 -2
  29. package/build/npm/esm/integrations/browserapierrors.js.map +1 -1
  30. package/build/npm/esm/integrations/browsersession.js +42 -0
  31. package/build/npm/esm/integrations/browsersession.js.map +1 -0
  32. package/build/npm/esm/integrations/featureFlags/featureFlagsIntegration.js +44 -0
  33. package/build/npm/esm/integrations/featureFlags/featureFlagsIntegration.js.map +1 -0
  34. package/build/npm/esm/integrations/featureFlags/launchdarkly/integration.js +52 -0
  35. package/build/npm/esm/integrations/featureFlags/launchdarkly/integration.js.map +1 -0
  36. package/build/npm/esm/integrations/featureFlags/openfeature/integration.js +34 -0
  37. package/build/npm/esm/integrations/featureFlags/openfeature/integration.js.map +1 -0
  38. package/build/npm/esm/integrations/globalhandlers.js +8 -4
  39. package/build/npm/esm/integrations/globalhandlers.js.map +1 -1
  40. package/build/npm/esm/integrations/httpclient.js +15 -4
  41. package/build/npm/esm/integrations/httpclient.js.map +1 -1
  42. package/build/npm/esm/integrations/reportingobserver.js.map +1 -1
  43. package/build/npm/esm/package.json +1 -1
  44. package/build/npm/esm/sdk.js +13 -38
  45. package/build/npm/esm/sdk.js.map +1 -1
  46. package/build/npm/esm/utils/featureFlags.js +91 -0
  47. package/build/npm/esm/utils/featureFlags.js.map +1 -0
  48. package/build/npm/types/index.d.ts +7 -3
  49. package/build/npm/types/index.d.ts.map +1 -1
  50. package/build/npm/types/integrations/browsersession.d.ts +8 -0
  51. package/build/npm/types/integrations/browsersession.d.ts.map +1 -0
  52. package/build/npm/types/integrations/featureFlags/featureFlagsIntegration.d.ts +31 -0
  53. package/build/npm/types/integrations/featureFlags/featureFlagsIntegration.d.ts.map +1 -0
  54. package/build/npm/types/integrations/featureFlags/index.d.ts +2 -0
  55. package/build/npm/types/integrations/featureFlags/index.d.ts.map +1 -0
  56. package/build/npm/types/integrations/featureFlags/launchdarkly/index.d.ts +2 -0
  57. package/build/npm/types/integrations/featureFlags/launchdarkly/index.d.ts.map +1 -0
  58. package/build/npm/types/integrations/featureFlags/launchdarkly/integration.d.ts +25 -0
  59. package/build/npm/types/integrations/featureFlags/launchdarkly/integration.d.ts.map +1 -0
  60. package/build/npm/types/integrations/featureFlags/launchdarkly/types.d.ts +44 -0
  61. package/build/npm/types/integrations/featureFlags/launchdarkly/types.d.ts.map +1 -0
  62. package/build/npm/types/integrations/featureFlags/openfeature/index.d.ts +2 -0
  63. package/build/npm/types/integrations/featureFlags/openfeature/index.d.ts.map +1 -0
  64. package/build/npm/types/integrations/featureFlags/openfeature/integration.d.ts +16 -0
  65. package/build/npm/types/integrations/featureFlags/openfeature/integration.d.ts.map +1 -0
  66. package/build/npm/types/integrations/featureFlags/openfeature/types.d.ts +86 -0
  67. package/build/npm/types/integrations/featureFlags/openfeature/types.d.ts.map +1 -0
  68. package/build/npm/types/integrations/reportingobserver.d.ts.map +1 -1
  69. package/build/npm/types/sdk.d.ts +1 -1
  70. package/build/npm/types/sdk.d.ts.map +1 -1
  71. package/build/npm/types/utils/featureFlags.d.ts +34 -0
  72. package/build/npm/types/utils/featureFlags.d.ts.map +1 -0
  73. package/build/npm/types-ts3.8/index.d.ts +7 -3
  74. package/build/npm/types-ts3.8/integrations/browsersession.d.ts +8 -0
  75. package/build/npm/types-ts3.8/integrations/featureFlags/featureFlagsIntegration.d.ts +31 -0
  76. package/build/npm/types-ts3.8/integrations/featureFlags/index.d.ts +2 -0
  77. package/build/npm/types-ts3.8/integrations/featureFlags/launchdarkly/index.d.ts +2 -0
  78. package/build/npm/types-ts3.8/integrations/featureFlags/launchdarkly/integration.d.ts +25 -0
  79. package/build/npm/types-ts3.8/integrations/featureFlags/launchdarkly/types.d.ts +44 -0
  80. package/build/npm/types-ts3.8/integrations/featureFlags/openfeature/index.d.ts +2 -0
  81. package/build/npm/types-ts3.8/integrations/featureFlags/openfeature/integration.d.ts +16 -0
  82. package/build/npm/types-ts3.8/integrations/featureFlags/openfeature/types.d.ts +86 -0
  83. package/build/npm/types-ts3.8/sdk.d.ts +1 -1
  84. package/build/npm/types-ts3.8/utils/featureFlags.d.ts +34 -0
  85. package/package.json +7 -7
@@ -1,10 +1,10 @@
1
- import { addHistoryInstrumentationHandler } from '@sentry-internal/browser-utils';
2
- import { inboundFiltersIntegration, functionToStringIntegration, dedupeIntegration, consoleSandbox, supportsFetch, logger, stackParserFromStackParserOptions, getIntegrationsToSetup, initAndBind, getCurrentScope, lastEventId, getReportDialogEndpoint, startSession, captureSession, getClient } from '@sentry/core';
1
+ import { inboundFiltersIntegration, functionToStringIntegration, dedupeIntegration, consoleSandbox, supportsFetch, logger, stackParserFromStackParserOptions, getIntegrationsToSetup, initAndBind, getCurrentScope, lastEventId, getReportDialogEndpoint, getClient } from '@sentry/core';
3
2
  import { BrowserClient } from './client.js';
4
3
  import { DEBUG_BUILD } from './debug-build.js';
5
4
  import { WINDOW } from './helpers.js';
6
5
  import { breadcrumbsIntegration } from './integrations/breadcrumbs.js';
7
6
  import { browserApiErrorsIntegration } from './integrations/browserapierrors.js';
7
+ import { browserSessionIntegration } from './integrations/browsersession.js';
8
8
  import { globalHandlersIntegration } from './integrations/globalhandlers.js';
9
9
  import { httpContextIntegration } from './integrations/httpcontext.js';
10
10
  import { linkedErrorsIntegration } from './integrations/linkederrors.js';
@@ -12,12 +12,12 @@ import { defaultStackParser } from './stack-parsers.js';
12
12
  import { makeFetchTransport } from './transports/fetch.js';
13
13
 
14
14
  /** Get the default integrations for the browser SDK. */
15
- function getDefaultIntegrations(_options) {
15
+ function getDefaultIntegrations(options) {
16
16
  /**
17
17
  * Note: Please make sure this stays in sync with Angular SDK, which re-exports
18
18
  * `getDefaultIntegrations` but with an adjusted set of integrations.
19
19
  */
20
- return [
20
+ const integrations = [
21
21
  inboundFiltersIntegration(),
22
22
  functionToStringIntegration(),
23
23
  browserApiErrorsIntegration(),
@@ -27,11 +27,18 @@ function getDefaultIntegrations(_options) {
27
27
  dedupeIntegration(),
28
28
  httpContextIntegration(),
29
29
  ];
30
+
31
+ // eslint-disable-next-line deprecation/deprecation
32
+ if (options.autoSessionTracking !== false) {
33
+ integrations.push(browserSessionIntegration());
34
+ }
35
+
36
+ return integrations;
30
37
  }
31
38
 
32
39
  function applyDefaultOptions(optionsArg = {}) {
33
40
  const defaultOptions = {
34
- defaultIntegrations: getDefaultIntegrations(),
41
+ defaultIntegrations: getDefaultIntegrations(optionsArg),
35
42
  release:
36
43
  typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value
37
44
  ? __SENTRY_RELEASE__
@@ -157,13 +164,7 @@ function init(browserOptions = {}) {
157
164
  transport: options.transport || makeFetchTransport,
158
165
  };
159
166
 
160
- const client = initAndBind(BrowserClient, clientOptions);
161
-
162
- if (options.autoSessionTracking) {
163
- startSessionTracking();
164
- }
165
-
166
- return client;
167
+ return initAndBind(BrowserClient, clientOptions);
167
168
  }
168
169
 
169
170
  /**
@@ -252,32 +253,6 @@ function onLoad(callback) {
252
253
  callback();
253
254
  }
254
255
 
255
- /**
256
- * Enable automatic Session Tracking for the initial page load.
257
- */
258
- function startSessionTracking() {
259
- if (typeof WINDOW.document === 'undefined') {
260
- DEBUG_BUILD && logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');
261
- return;
262
- }
263
-
264
- // The session duration for browser sessions does not track a meaningful
265
- // concept that can be used as a metric.
266
- // Automatically captured sessions are akin to page views, and thus we
267
- // discard their duration.
268
- startSession({ ignoreDuration: true });
269
- captureSession();
270
-
271
- // We want to create a session for every navigation as well
272
- addHistoryInstrumentationHandler(({ from, to }) => {
273
- // Don't create an additional session for the initial route or if the location did not change
274
- if (from !== undefined && from !== to) {
275
- startSession({ ignoreDuration: true });
276
- captureSession();
277
- }
278
- });
279
- }
280
-
281
256
  /**
282
257
  * Captures user feedback and sends it to Sentry.
283
258
  *
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sources":["../../../src/sdk.ts"],"sourcesContent":["import { addHistoryInstrumentationHandler } from '@sentry-internal/browser-utils';\nimport {\n captureSession,\n consoleSandbox,\n dedupeIntegration,\n functionToStringIntegration,\n getClient,\n getCurrentScope,\n getIntegrationsToSetup,\n getReportDialogEndpoint,\n inboundFiltersIntegration,\n initAndBind,\n lastEventId,\n logger,\n stackParserFromStackParserOptions,\n startSession,\n supportsFetch,\n} from '@sentry/core';\nimport type { Client, DsnLike, Integration, Options, UserFeedback } from '@sentry/core';\nimport type { BrowserClientOptions, BrowserOptions } from './client';\nimport { BrowserClient } from './client';\nimport { DEBUG_BUILD } from './debug-build';\nimport { WINDOW } from './helpers';\nimport { breadcrumbsIntegration } from './integrations/breadcrumbs';\nimport { browserApiErrorsIntegration } from './integrations/browserapierrors';\nimport { globalHandlersIntegration } from './integrations/globalhandlers';\nimport { httpContextIntegration } from './integrations/httpcontext';\nimport { linkedErrorsIntegration } from './integrations/linkederrors';\nimport { defaultStackParser } from './stack-parsers';\nimport { makeFetchTransport } from './transports/fetch';\n\n/** Get the default integrations for the browser SDK. */\nexport function getDefaultIntegrations(_options: Options): Integration[] {\n /**\n * Note: Please make sure this stays in sync with Angular SDK, which re-exports\n * `getDefaultIntegrations` but with an adjusted set of integrations.\n */\n return [\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n browserApiErrorsIntegration(),\n breadcrumbsIntegration(),\n globalHandlersIntegration(),\n linkedErrorsIntegration(),\n dedupeIntegration(),\n httpContextIntegration(),\n ];\n}\n\nfunction applyDefaultOptions(optionsArg: BrowserOptions = {}): BrowserOptions {\n const defaultOptions: BrowserOptions = {\n defaultIntegrations: getDefaultIntegrations(optionsArg),\n release:\n typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n ? __SENTRY_RELEASE__\n : WINDOW.SENTRY_RELEASE && WINDOW.SENTRY_RELEASE.id // This supports the variable that sentry-webpack-plugin injects\n ? WINDOW.SENTRY_RELEASE.id\n : undefined,\n autoSessionTracking: true,\n sendClientReports: true,\n };\n\n // TODO: Instead of dropping just `defaultIntegrations`, we should simply\n // call `dropUndefinedKeys` on the entire `optionsArg`.\n // However, for this to work we need to adjust the `hasTracingEnabled()` logic\n // first as it differentiates between `undefined` and the key not being in the object.\n if (optionsArg.defaultIntegrations == null) {\n delete optionsArg.defaultIntegrations;\n }\n\n return { ...defaultOptions, ...optionsArg };\n}\n\ntype ExtensionProperties = {\n chrome?: Runtime;\n browser?: Runtime;\n nw?: unknown;\n};\ntype Runtime = {\n runtime?: {\n id?: string;\n };\n};\n\nfunction shouldShowBrowserExtensionError(): boolean {\n const windowWithMaybeExtension =\n typeof WINDOW.window !== 'undefined' && (WINDOW as typeof WINDOW & ExtensionProperties);\n if (!windowWithMaybeExtension) {\n // No need to show the error if we're not in a browser window environment (e.g. service workers)\n return false;\n }\n\n const extensionKey = windowWithMaybeExtension.chrome ? 'chrome' : 'browser';\n const extensionObject = windowWithMaybeExtension[extensionKey];\n\n const runtimeId = extensionObject && extensionObject.runtime && extensionObject.runtime.id;\n const href = (WINDOW.location && WINDOW.location.href) || '';\n\n const extensionProtocols = ['chrome-extension:', 'moz-extension:', 'ms-browser-extension:', 'safari-web-extension:'];\n\n // Running the SDK in a dedicated extension page and calling Sentry.init is fine; no risk of data leakage\n const isDedicatedExtensionPage =\n !!runtimeId && WINDOW === WINDOW.top && extensionProtocols.some(protocol => href.startsWith(`${protocol}//`));\n\n // Running the SDK in NW.js, which appears like a browser extension but isn't, is also fine\n // see: https://github.com/getsentry/sentry-javascript/issues/12668\n const isNWjs = typeof windowWithMaybeExtension.nw !== 'undefined';\n\n return !!runtimeId && !isDedicatedExtensionPage && !isNWjs;\n}\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\ndeclare const __SENTRY_RELEASE__: string | undefined;\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(browserOptions: BrowserOptions = {}): Client | undefined {\n const options = applyDefaultOptions(browserOptions);\n\n if (!options.skipBrowserExtensionCheck && shouldShowBrowserExtensionError()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(\n '[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',\n );\n });\n return;\n }\n\n if (DEBUG_BUILD) {\n if (!supportsFetch()) {\n logger.warn(\n 'No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.',\n );\n }\n }\n const clientOptions: BrowserClientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || makeFetchTransport,\n };\n\n const client = initAndBind(BrowserClient, clientOptions);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n\n return client;\n}\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(this: void): void;\n /** Callback after reportDialog closed */\n onClose?(this: void): void;\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n // doesn't work without a document (React Native)\n if (!WINDOW.document) {\n DEBUG_BUILD && logger.error('Global document not defined in showReportDialog call');\n return;\n }\n\n const scope = getCurrentScope();\n const client = scope.getClient();\n const dsn = client && client.getDsn();\n\n if (!dsn) {\n DEBUG_BUILD && logger.error('DSN not configured for showReportDialog call');\n return;\n }\n\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n const eventId = lastEventId();\n if (eventId) {\n options.eventId = eventId;\n }\n }\n\n const script = WINDOW.document.createElement('script');\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = getReportDialogEndpoint(dsn, options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n const { onClose } = options;\n if (onClose) {\n const reportDialogClosedMessageHandler = (event: MessageEvent): void => {\n if (event.data === '__sentry_reportdialog_closed__') {\n try {\n onClose();\n } finally {\n WINDOW.removeEventListener('message', reportDialogClosedMessageHandler);\n }\n }\n };\n WINDOW.addEventListener('message', reportDialogClosedMessageHandler);\n }\n\n const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n } else {\n DEBUG_BUILD && logger.error('Not injecting report dialog. No injection point found in HTML');\n }\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking(): void {\n if (typeof WINDOW.document === 'undefined') {\n DEBUG_BUILD && logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSession({ ignoreDuration: true });\n captureSession();\n\n // We want to create a session for every navigation as well\n addHistoryInstrumentationHandler(({ from, to }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (from !== undefined && from !== to) {\n startSession({ ignoreDuration: true });\n captureSession();\n }\n });\n}\n\n/**\n * Captures user feedback and sends it to Sentry.\n *\n * @deprecated Use `captureFeedback` instead.\n */\nexport function captureUserFeedback(feedback: UserFeedback): void {\n const client = getClient<BrowserClient>();\n if (client) {\n // eslint-disable-next-line deprecation/deprecation\n client.captureUserFeedback(feedback);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AA+BA;AACO,SAAS,sBAAsB,CAAC,QAAQ,EAA0B;AACzE;AACA;AACA;AACA;AACA,EAAE,OAAO;AACT,IAAI,yBAAyB,EAAE;AAC/B,IAAI,2BAA2B,EAAE;AACjC,IAAI,2BAA2B,EAAE;AACjC,IAAI,sBAAsB,EAAE;AAC5B,IAAI,yBAAyB,EAAE;AAC/B,IAAI,uBAAuB,EAAE;AAC7B,IAAI,iBAAiB,EAAE;AACvB,IAAI,sBAAsB,EAAE;AAC5B,GAAG;AACH;;AAEA,SAAS,mBAAmB,CAAC,UAAU,GAAmB,EAAE,EAAkB;AAC9E,EAAE,MAAM,cAAc,GAAmB;AACzC,IAAI,mBAAmB,EAAE,sBAAsB,CAAW,CAAC;AAC3D,IAAI,OAAO;AACX,MAAM,OAAO,uBAAuB,QAAA;AACpC,UAAU;AACV,UAAU,MAAM,CAAC,cAAA,IAAkB,MAAM,CAAC,cAAc,CAAC,EAAA;AACzD,YAAY,MAAM,CAAC,cAAc,CAAC;AAClC,YAAY,SAAS;AACrB,IAAI,mBAAmB,EAAE,IAAI;AAC7B,IAAI,iBAAiB,EAAE,IAAI;AAC3B,GAAG;;AAEH;AACA;AACA;AACA;AACA,EAAE,IAAI,UAAU,CAAC,mBAAoB,IAAG,IAAI,EAAE;AAC9C,IAAI,OAAO,UAAU,CAAC,mBAAmB;AACzC;;AAEA,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,GAAG,Y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AAA,MAAA,CAAA,QAAA,CAAA,IAAA;AACA,EAAA,IAAA,cAAA,EAAA;AACA,IAAA,cAAA,CAAA,WAAA,CAAA,MAAA,CAAA;AACA,GAAA,MAAA;AACA,IAAA,WAAA,IAAA,MAAA,CAAA,KAAA,CAAA,+DAAA,CAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAA,SAAA,GAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAA,MAAA,CAAA,QAAA,EAAA;AACA,EAAA,QAAA,EAAA;AACA;;AAEA;AACA;AACA;AACA,SAAA,oBAAA,GAAA;AACA,EAAA,IAAA,OAAA,MAAA,CAAA,QAAA,KAAA,WAAA,EAAA;AACA,IAAA,WAAA,IAAA,MAAA,CAAA,IAAA,CAAA,oFAAA,CAAA;AACA,IAAA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAA,YAAA,CAAA,EAAA,cAAA,EAAA,IAAA,EAAA,CAAA;AACA,EAAA,cAAA,EAAA;;AAEA;AACA,EAAA,gCAAA,CAAA,CAAA,EAAA,IAAA,EAAA,EAAA,EAAA,KAAA;AACA;AACA,IAAA,IAAA,IAAA,KAAA,SAAA,IAAA,IAAA,KAAA,EAAA,EAAA;AACA,MAAA,YAAA,CAAA,EAAA,cAAA,EAAA,IAAA,EAAA,CAAA;AACA,MAAA,cAAA,EAAA;AACA;AACA,GAAA,CAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAA,mBAAA,CAAA,QAAA,EAAA;AACA,EAAA,MAAA,MAAA,GAAA,SAAA,EAAA;AACA,EAAA,IAAA,MAAA,EAAA;AACA;AACA,IAAA,MAAA,CAAA,mBAAA,CAAA,QAAA,CAAA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"sdk.js","sources":["../../../src/sdk.ts"],"sourcesContent":["import {\n consoleSandbox,\n dedupeIntegration,\n functionToStringIntegration,\n getClient,\n getCurrentScope,\n getIntegrationsToSetup,\n getReportDialogEndpoint,\n inboundFiltersIntegration,\n initAndBind,\n lastEventId,\n logger,\n stackParserFromStackParserOptions,\n supportsFetch,\n} from '@sentry/core';\nimport type { Client, DsnLike, Integration, Options, UserFeedback } from '@sentry/core';\nimport type { BrowserClientOptions, BrowserOptions } from './client';\nimport { BrowserClient } from './client';\nimport { DEBUG_BUILD } from './debug-build';\nimport { WINDOW } from './helpers';\nimport { breadcrumbsIntegration } from './integrations/breadcrumbs';\nimport { browserApiErrorsIntegration } from './integrations/browserapierrors';\nimport { browserSessionIntegration } from './integrations/browsersession';\nimport { globalHandlersIntegration } from './integrations/globalhandlers';\nimport { httpContextIntegration } from './integrations/httpcontext';\nimport { linkedErrorsIntegration } from './integrations/linkederrors';\nimport { defaultStackParser } from './stack-parsers';\nimport { makeFetchTransport } from './transports/fetch';\n\n/** Get the default integrations for the browser SDK. */\nexport function getDefaultIntegrations(options: Options): Integration[] {\n /**\n * Note: Please make sure this stays in sync with Angular SDK, which re-exports\n * `getDefaultIntegrations` but with an adjusted set of integrations.\n */\n const integrations = [\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n browserApiErrorsIntegration(),\n breadcrumbsIntegration(),\n globalHandlersIntegration(),\n linkedErrorsIntegration(),\n dedupeIntegration(),\n httpContextIntegration(),\n ];\n\n // eslint-disable-next-line deprecation/deprecation\n if (options.autoSessionTracking !== false) {\n integrations.push(browserSessionIntegration());\n }\n\n return integrations;\n}\n\nfunction applyDefaultOptions(optionsArg: BrowserOptions = {}): BrowserOptions {\n const defaultOptions: BrowserOptions = {\n defaultIntegrations: getDefaultIntegrations(optionsArg),\n release:\n typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n ? __SENTRY_RELEASE__\n : WINDOW.SENTRY_RELEASE && WINDOW.SENTRY_RELEASE.id // This supports the variable that sentry-webpack-plugin injects\n ? WINDOW.SENTRY_RELEASE.id\n : undefined,\n autoSessionTracking: true,\n sendClientReports: true,\n };\n\n // TODO: Instead of dropping just `defaultIntegrations`, we should simply\n // call `dropUndefinedKeys` on the entire `optionsArg`.\n // However, for this to work we need to adjust the `hasTracingEnabled()` logic\n // first as it differentiates between `undefined` and the key not being in the object.\n if (optionsArg.defaultIntegrations == null) {\n delete optionsArg.defaultIntegrations;\n }\n\n return { ...defaultOptions, ...optionsArg };\n}\n\ntype ExtensionProperties = {\n chrome?: Runtime;\n browser?: Runtime;\n nw?: unknown;\n};\ntype Runtime = {\n runtime?: {\n id?: string;\n };\n};\n\nfunction shouldShowBrowserExtensionError(): boolean {\n const windowWithMaybeExtension =\n typeof WINDOW.window !== 'undefined' && (WINDOW as typeof WINDOW & ExtensionProperties);\n if (!windowWithMaybeExtension) {\n // No need to show the error if we're not in a browser window environment (e.g. service workers)\n return false;\n }\n\n const extensionKey = windowWithMaybeExtension.chrome ? 'chrome' : 'browser';\n const extensionObject = windowWithMaybeExtension[extensionKey];\n\n const runtimeId = extensionObject && extensionObject.runtime && extensionObject.runtime.id;\n const href = (WINDOW.location && WINDOW.location.href) || '';\n\n const extensionProtocols = ['chrome-extension:', 'moz-extension:', 'ms-browser-extension:', 'safari-web-extension:'];\n\n // Running the SDK in a dedicated extension page and calling Sentry.init is fine; no risk of data leakage\n const isDedicatedExtensionPage =\n !!runtimeId && WINDOW === WINDOW.top && extensionProtocols.some(protocol => href.startsWith(`${protocol}//`));\n\n // Running the SDK in NW.js, which appears like a browser extension but isn't, is also fine\n // see: https://github.com/getsentry/sentry-javascript/issues/12668\n const isNWjs = typeof windowWithMaybeExtension.nw !== 'undefined';\n\n return !!runtimeId && !isDedicatedExtensionPage && !isNWjs;\n}\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\ndeclare const __SENTRY_RELEASE__: string | undefined;\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(browserOptions: BrowserOptions = {}): Client | undefined {\n const options = applyDefaultOptions(browserOptions);\n\n if (!options.skipBrowserExtensionCheck && shouldShowBrowserExtensionError()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(\n '[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',\n );\n });\n return;\n }\n\n if (DEBUG_BUILD) {\n if (!supportsFetch()) {\n logger.warn(\n 'No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.',\n );\n }\n }\n const clientOptions: BrowserClientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || makeFetchTransport,\n };\n\n return initAndBind(BrowserClient, clientOptions);\n}\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n // TODO(v9): Change this to [key: string]: unknkown;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(this: void): void;\n /** Callback after reportDialog closed */\n onClose?(this: void): void;\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n // doesn't work without a document (React Native)\n if (!WINDOW.document) {\n DEBUG_BUILD && logger.error('Global document not defined in showReportDialog call');\n return;\n }\n\n const scope = getCurrentScope();\n const client = scope.getClient();\n const dsn = client && client.getDsn();\n\n if (!dsn) {\n DEBUG_BUILD && logger.error('DSN not configured for showReportDialog call');\n return;\n }\n\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n const eventId = lastEventId();\n if (eventId) {\n options.eventId = eventId;\n }\n }\n\n const script = WINDOW.document.createElement('script');\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = getReportDialogEndpoint(dsn, options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n const { onClose } = options;\n if (onClose) {\n const reportDialogClosedMessageHandler = (event: MessageEvent): void => {\n if (event.data === '__sentry_reportdialog_closed__') {\n try {\n onClose();\n } finally {\n WINDOW.removeEventListener('message', reportDialogClosedMessageHandler);\n }\n }\n };\n WINDOW.addEventListener('message', reportDialogClosedMessageHandler);\n }\n\n const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n } else {\n DEBUG_BUILD && logger.error('Not injecting report dialog. No injection point found in HTML');\n }\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * Captures user feedback and sends it to Sentry.\n *\n * @deprecated Use `captureFeedback` instead.\n */\nexport function captureUserFeedback(feedback: UserFeedback): void {\n const client = getClient<BrowserClient>();\n if (client) {\n // eslint-disable-next-line deprecation/deprecation\n client.captureUserFeedback(feedback);\n }\n}\n"],"names":[],"mappings":";;;;;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A,MAAA,CAAA,QAAA,EAAA;AACA,EAAA,QAAA,EAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAA,mBAAA,CAAA,QAAA,EAAA;AACA,EAAA,MAAA,MAAA,GAAA,SAAA,EAAA;AACA,EAAA,IAAA,MAAA,EAAA;AACA;AACA,IAAA,MAAA,CAAA,mBAAA,CAAA,QAAA,CAAA;AACA;AACA;;;;"}
@@ -0,0 +1,91 @@
1
+ import { getCurrentScope, logger } from '@sentry/core';
2
+ import { DEBUG_BUILD } from '../debug-build.js';
3
+
4
+ /**
5
+ * Ordered LRU cache for storing feature flags in the scope context. The name
6
+ * of each flag in the buffer is unique, and the output of getAll() is ordered
7
+ * from oldest to newest.
8
+ */
9
+
10
+ /**
11
+ * Max size of the LRU flag buffer stored in Sentry scope and event contexts.
12
+ */
13
+ const FLAG_BUFFER_SIZE = 100;
14
+
15
+ /**
16
+ * Copies feature flags that are in current scope context to the event context
17
+ */
18
+ function copyFlagsFromScopeToEvent(event) {
19
+ const scope = getCurrentScope();
20
+ const flagContext = scope.getScopeData().contexts.flags;
21
+ const flagBuffer = flagContext ? flagContext.values : [];
22
+
23
+ if (!flagBuffer.length) {
24
+ return event;
25
+ }
26
+
27
+ if (event.contexts === undefined) {
28
+ event.contexts = {};
29
+ }
30
+ event.contexts.flags = { values: [...flagBuffer] };
31
+ return event;
32
+ }
33
+
34
+ /**
35
+ * Creates a feature flags values array in current context if it does not exist
36
+ * and inserts the flag into a FeatureFlag array while maintaining ordered LRU
37
+ * properties. Not thread-safe. After inserting:
38
+ * - `flags` is sorted in order of recency, with the newest flag at the end.
39
+ * - No other flags with the same name exist in `flags`.
40
+ * - The length of `flags` does not exceed `maxSize`. The oldest flag is evicted
41
+ * as needed.
42
+ *
43
+ * @param name Name of the feature flag to insert.
44
+ * @param value Value of the feature flag.
45
+ * @param maxSize Max number of flags the buffer should store. It's recommended
46
+ * to keep this consistent across insertions. Default is FLAG_BUFFER_SIZE
47
+ */
48
+ function insertFlagToScope(name, value, maxSize = FLAG_BUFFER_SIZE) {
49
+ const scopeContexts = getCurrentScope().getScopeData().contexts;
50
+ if (!scopeContexts.flags) {
51
+ scopeContexts.flags = { values: [] };
52
+ }
53
+ const flags = scopeContexts.flags.values ;
54
+ insertToFlagBuffer(flags, name, value, maxSize);
55
+ }
56
+
57
+ /**
58
+ * Exported for tests. Currently only accepts boolean values (otherwise no-op).
59
+ */
60
+ function insertToFlagBuffer(flags, name, value, maxSize) {
61
+ if (typeof value !== 'boolean') {
62
+ return;
63
+ }
64
+
65
+ if (flags.length > maxSize) {
66
+ DEBUG_BUILD && logger.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${maxSize}`);
67
+ return;
68
+ }
69
+
70
+ // Check if the flag is already in the buffer - O(n)
71
+ const index = flags.findIndex(f => f.flag === name);
72
+
73
+ if (index !== -1) {
74
+ // The flag was found, remove it from its current position - O(n)
75
+ flags.splice(index, 1);
76
+ }
77
+
78
+ if (flags.length === maxSize) {
79
+ // If at capacity, pop the earliest flag - O(n)
80
+ flags.shift();
81
+ }
82
+
83
+ // Push the flag to the end - O(1)
84
+ flags.push({
85
+ flag: name,
86
+ result: value,
87
+ });
88
+ }
89
+
90
+ export { FLAG_BUFFER_SIZE, copyFlagsFromScopeToEvent, insertFlagToScope, insertToFlagBuffer };
91
+ //# sourceMappingURL=featureFlags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"featureFlags.js","sources":["../../../../src/utils/featureFlags.ts"],"sourcesContent":["import type { Event, FeatureFlag } from '@sentry/core';\n\nimport { getCurrentScope, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\n\n/**\n * Ordered LRU cache for storing feature flags in the scope context. The name\n * of each flag in the buffer is unique, and the output of getAll() is ordered\n * from oldest to newest.\n */\n\n/**\n * Max size of the LRU flag buffer stored in Sentry scope and event contexts.\n */\nexport const FLAG_BUFFER_SIZE = 100;\n\n/**\n * Copies feature flags that are in current scope context to the event context\n */\nexport function copyFlagsFromScopeToEvent(event: Event): Event {\n const scope = getCurrentScope();\n const flagContext = scope.getScopeData().contexts.flags;\n const flagBuffer = flagContext ? flagContext.values : [];\n\n if (!flagBuffer.length) {\n return event;\n }\n\n if (event.contexts === undefined) {\n event.contexts = {};\n }\n event.contexts.flags = { values: [...flagBuffer] };\n return event;\n}\n\n/**\n * Creates a feature flags values array in current context if it does not exist\n * and inserts the flag into a FeatureFlag array while maintaining ordered LRU\n * properties. Not thread-safe. After inserting:\n * - `flags` is sorted in order of recency, with the newest flag at the end.\n * - No other flags with the same name exist in `flags`.\n * - The length of `flags` does not exceed `maxSize`. The oldest flag is evicted\n * as needed.\n *\n * @param name Name of the feature flag to insert.\n * @param value Value of the feature flag.\n * @param maxSize Max number of flags the buffer should store. It's recommended\n * to keep this consistent across insertions. Default is FLAG_BUFFER_SIZE\n */\nexport function insertFlagToScope(name: string, value: unknown, maxSize: number = FLAG_BUFFER_SIZE): void {\n const scopeContexts = getCurrentScope().getScopeData().contexts;\n if (!scopeContexts.flags) {\n scopeContexts.flags = { values: [] };\n }\n const flags = scopeContexts.flags.values as FeatureFlag[];\n insertToFlagBuffer(flags, name, value, maxSize);\n}\n\n/**\n * Exported for tests. Currently only accepts boolean values (otherwise no-op).\n */\nexport function insertToFlagBuffer(flags: FeatureFlag[], name: string, value: unknown, maxSize: number): void {\n if (typeof value !== 'boolean') {\n return;\n }\n\n if (flags.length > maxSize) {\n DEBUG_BUILD && logger.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${maxSize}`);\n return;\n }\n\n // Check if the flag is already in the buffer - O(n)\n const index = flags.findIndex(f => f.flag === name);\n\n if (index !== -1) {\n // The flag was found, remove it from its current position - O(n)\n flags.splice(index, 1);\n }\n\n if (flags.length === maxSize) {\n // If at capacity, pop the earliest flag - O(n)\n flags.shift();\n }\n\n // Push the flag to the end - O(1)\n flags.push({\n flag: name,\n result: value,\n });\n}\n"],"names":[],"mappings":";;;AAKA;AACA;AACA;AAC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AAClC,IAAI;AACJ;;AAEA,EAAE,IAAI,KAAK,CAAC,MAAO,GAAE,OAAO,EAAE;AAC9B,IAAI,WAAA,IAAe,MAAM,CAAC,KAAK,CAAC,CAAC,0EAA0E,EAAE,OAAO,CAAC,CAAA,CAAA;AACA,IAAA;AACA;;AAEA;AACA,EAAA,MAAA,KAAA,GAAA,KAAA,CAAA,SAAA,CAAA,CAAA,IAAA,CAAA,CAAA,IAAA,KAAA,IAAA,CAAA;;AAEA,EAAA,IAAA,KAAA,KAAA,CAAA,CAAA,EAAA;AACA;AACA,IAAA,KAAA,CAAA,MAAA,CAAA,KAAA,EAAA,CAAA,CAAA;AACA;;AAEA,EAAA,IAAA,KAAA,CAAA,MAAA,KAAA,OAAA,EAAA;AACA;AACA,IAAA,KAAA,CAAA,KAAA,EAAA;AACA;;AAEA;AACA,EAAA,KAAA,CAAA,IAAA,CAAA;AACA,IAAA,IAAA,EAAA,IAAA;AACA,IAAA,MAAA,EAAA,KAAA;AACA,GAAA,CAAA;AACA;;;;"}
@@ -3,15 +3,15 @@ export { reportingObserverIntegration } from './integrations/reportingobserver';
3
3
  export { httpClientIntegration } from './integrations/httpclient';
4
4
  export { contextLinesIntegration } from './integrations/contextlines';
5
5
  export { captureConsoleIntegration, debugIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, captureFeedback, } from '@sentry/core';
6
- export { replayIntegration, getReplay, } from '@sentry-internal/replay';
6
+ export { replayIntegration, getReplay } from '@sentry-internal/replay';
7
7
  export type { ReplayEventType, ReplayEventWithTime, ReplayBreadcrumbFrame, ReplayBreadcrumbFrameEvent, ReplayOptionFrameEvent, ReplayFrame, ReplayFrameEvent, ReplaySpanFrame, ReplaySpanFrameEvent, } from '@sentry-internal/replay';
8
8
  export { replayCanvasIntegration } from '@sentry-internal/replay-canvas';
9
9
  import { feedbackAsyncIntegration } from './feedbackAsync';
10
10
  import { feedbackSyncIntegration } from './feedbackSync';
11
11
  export { feedbackAsyncIntegration, feedbackSyncIntegration, feedbackSyncIntegration as feedbackIntegration };
12
- export { getFeedback, sendFeedback, } from '@sentry-internal/feedback';
12
+ export { getFeedback, sendFeedback } from '@sentry-internal/feedback';
13
13
  export * from './metrics';
14
- export { defaultRequestInstrumentationOptions, instrumentOutgoingRequests, } from './tracing/request';
14
+ export { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './tracing/request';
15
15
  export { browserTracingIntegration, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan, } from './tracing/browserTracingIntegration';
16
16
  export type { RequestInstrumentationOptions } from './tracing/request';
17
17
  export { addTracingExtensions, registerSpanErrorInstrumentation, getActiveSpan, getRootSpan, startSpan, startInactiveSpan, startSpanManual, withActiveSpan, startNewTrace, getSpanDescendants, setMeasurement, getSpanStatusFromHttpCode, setHttpStatus, makeMultiplexedTransport, moduleMetadataIntegration, zodErrorsIntegration, thirdPartyErrorFilterIntegration, } from '@sentry/core';
@@ -19,4 +19,8 @@ export type { Span } from '@sentry/core';
19
19
  export { makeBrowserOfflineTransport } from './transports/offline';
20
20
  export { browserProfilingIntegration } from './profiling/integration';
21
21
  export { spotlightBrowserIntegration } from './integrations/spotlight';
22
+ export { browserSessionIntegration } from './integrations/browsersession';
23
+ export { featureFlagsIntegration, type FeatureFlagsIntegration, } from './integrations/featureFlags';
24
+ export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler } from './integrations/featureFlags/launchdarkly';
25
+ export { openFeatureIntegration, OpenFeatureIntegrationHook } from './integrations/featureFlags/openfeature';
22
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,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mBAAmB,CAAC;AACvE,OAAO,EAEL,oBAAoB,EACpB,gCAAgC,EAChC,aAAa,EACb,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,gCAAgC,GACjC,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EACL,uBAAuB,EACvB,KAAK,uBAAuB,GAC7B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AACrH,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * When added, automatically creates sessions which allow you to track adoption and crashes (crash free rate) in your Releases in Sentry.
3
+ * More information: https://docs.sentry.io/product/releases/health/
4
+ *
5
+ * Note: In order for session tracking to work, you need to set up Releases: https://docs.sentry.io/product/releases/
6
+ */
7
+ export declare const browserSessionIntegration: () => import("@sentry/core").Integration;
8
+ //# sourceMappingURL=browsersession.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browsersession.d.ts","sourceRoot":"","sources":["../../../../src/integrations/browsersession.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,0CA2BpC,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { Integration, IntegrationFn } from '@sentry/core';
2
+ export interface FeatureFlagsIntegration extends Integration {
3
+ addFeatureFlag: (name: string, value: unknown) => void;
4
+ }
5
+ /**
6
+ * Sentry integration for buffering feature flags manually with an API, and
7
+ * capturing them on error events. We recommend you do this on each flag
8
+ * evaluation. Flags are buffered per Sentry scope and limited to 100 per event.
9
+ *
10
+ * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.
11
+ *
12
+ * @example
13
+ * ```
14
+ * import * as Sentry from '@sentry/browser';
15
+ * import { type FeatureFlagsIntegration } from '@sentry/browser';
16
+ *
17
+ * // Setup
18
+ * Sentry.init(..., integrations: [Sentry.featureFlagsIntegration()])
19
+ *
20
+ * // Verify
21
+ * const flagsIntegration = Sentry.getClient()?.getIntegrationByName<FeatureFlagsIntegration>('FeatureFlags');
22
+ * if (flagsIntegration) {
23
+ * flagsIntegration.addFeatureFlag('my-flag', true);
24
+ * } else {
25
+ * // check your setup
26
+ * }
27
+ * Sentry.captureException(Exception('broke')); // 'my-flag' should be captured to this Sentry event.
28
+ * ```
29
+ */
30
+ export declare const featureFlagsIntegration: IntegrationFn<FeatureFlagsIntegration>;
31
+ //# sourceMappingURL=featureFlagsIntegration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"featureFlagsIntegration.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/featureFlags/featureFlagsIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA4B,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAKzF,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACxD;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,uBAAuB,wCAYQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { featureFlagsIntegration, type FeatureFlagsIntegration } from './featureFlagsIntegration';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/featureFlags/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,KAAK,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler } from './integration';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/launchdarkly/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { LDInspectionFlagUsedHandler } from './types';
2
+ /**
3
+ * Sentry integration for capturing feature flags from LaunchDarkly.
4
+ *
5
+ * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.
6
+ *
7
+ * @example
8
+ * ```
9
+ * import * as Sentry from '@sentry/browser';
10
+ * import {launchDarklyIntegration, buildLaunchDarklyFlagUsedInspector} from '@sentry/browser';
11
+ * import * as LaunchDarkly from 'launchdarkly-js-client-sdk';
12
+ *
13
+ * Sentry.init(..., integrations: [launchDarklyIntegration()])
14
+ * const ldClient = LaunchDarkly.initialize(..., {inspectors: [buildLaunchDarklyFlagUsedHandler()]});
15
+ * ```
16
+ */
17
+ export declare const launchDarklyIntegration: () => import("@sentry/core").Integration;
18
+ /**
19
+ * LaunchDarkly hook that listens for flag evaluations and updates the `flags`
20
+ * context in our Sentry scope. This needs to be registered as an
21
+ * 'inspector' in LaunchDarkly initialize() options, separately from
22
+ * `launchDarklyIntegration`. Both are needed to collect feature flags on error.
23
+ */
24
+ export declare function buildLaunchDarklyFlagUsedHandler(): LDInspectionFlagUsedHandler;
25
+ //# sourceMappingURL=integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/launchdarkly/integration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiC,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAK1F;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,uBAAuB,0CAQV,CAAC;AAE3B;;;;;GAKG;AACH,wBAAgB,gCAAgC,IAAI,2BAA2B,CAc9E"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Inline definitions of LaunchDarkly types so we don't have to include their
3
+ * SDK in devDependencies. These are only for type-checking and can be extended
4
+ * as needed - for exact definitions, reference `launchdarkly-js-client-sdk`.
5
+ */
6
+ /**
7
+ * Currently, the Sentry integration does not read from values of this type.
8
+ */
9
+ export type LDContext = object;
10
+ /**
11
+ * An object that combines the result of a feature flag evaluation with information about
12
+ * how it was calculated.
13
+ */
14
+ export interface LDEvaluationDetail {
15
+ value: unknown;
16
+ }
17
+ /**
18
+ * Callback interface for collecting information about the SDK at runtime.
19
+ *
20
+ * This interface is used to collect information about flag usage.
21
+ *
22
+ * This interface should not be used by the application to access flags for the purpose of controlling application
23
+ * flow. It is intended for monitoring, analytics, or debugging purposes.
24
+ */
25
+ export interface LDInspectionFlagUsedHandler {
26
+ type: 'flag-used';
27
+ /**
28
+ * Name of the inspector. Will be used for logging issues with the inspector.
29
+ */
30
+ name: string;
31
+ /**
32
+ * If `true`, then the inspector will be ran synchronously with evaluation.
33
+ * Synchronous inspectors execute inline with evaluation and care should be taken to ensure
34
+ * they have minimal performance overhead.
35
+ */
36
+ synchronous?: boolean;
37
+ /**
38
+ * This method is called when a flag is accessed via a variation method, or it can be called based on actions in
39
+ * wrapper SDKs which have different methods of tracking when a flag was accessed. It is not called when a call is made
40
+ * to allFlags.
41
+ */
42
+ method: (flagKey: string, flagDetail: LDEvaluationDetail, context: LDContext) => void;
43
+ }
44
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/launchdarkly/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,OAAO,CAAC;CAEhB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,WAAW,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,OAAO,EAAE,SAAS,KAAK,IAAI,CAAC;CACvF"}
@@ -0,0 +1,2 @@
1
+ export { openFeatureIntegration, OpenFeatureIntegrationHook } from './integration';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/openfeature/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { EvaluationDetails, HookContext, HookHints, JsonValue, OpenFeatureHook } from './types';
2
+ export declare const openFeatureIntegration: () => import("@sentry/core").Integration;
3
+ /**
4
+ * OpenFeature Hook class implementation.
5
+ */
6
+ export declare class OpenFeatureIntegrationHook implements OpenFeatureHook {
7
+ /**
8
+ * Successful evaluation result.
9
+ */
10
+ after(_hookContext: Readonly<HookContext<JsonValue>>, evaluationDetails: EvaluationDetails<JsonValue>): void;
11
+ /**
12
+ * On error evaluation result.
13
+ */
14
+ error(hookContext: Readonly<HookContext<JsonValue>>, _error: unknown, _hookHints?: HookHints): void;
15
+ }
16
+ //# sourceMappingURL=integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/openfeature/integration.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAKrG,eAAO,MAAM,sBAAsB,0CAQT,CAAC;AAE3B;;GAEG;AACH,qBAAa,0BAA2B,YAAW,eAAe;IAChE;;OAEG;IACI,KAAK,CAAC,YAAY,EAAE,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,SAAS,CAAC,GAAG,IAAI;IAInH;;OAEG;IACI,KAAK,CAAC,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,SAAS,GAAG,IAAI;CAG3G"}
@@ -0,0 +1,86 @@
1
+ export type FlagValue = boolean | string | number | JsonValue;
2
+ export type FlagValueType = 'boolean' | 'string' | 'number' | 'object';
3
+ export type JsonArray = JsonValue[];
4
+ export type JsonObject = {
5
+ [key: string]: JsonValue;
6
+ };
7
+ export type JsonValue = PrimitiveValue | JsonObject | JsonArray;
8
+ export type Metadata = Record<string, string>;
9
+ export type PrimitiveValue = null | boolean | string | number;
10
+ export type FlagMetadata = Record<string, string | number | boolean>;
11
+ export declare const StandardResolutionReasons: {
12
+ readonly STATIC: "STATIC";
13
+ readonly DEFAULT: "DEFAULT";
14
+ readonly TARGETING_MATCH: "TARGETING_MATCH";
15
+ readonly SPLIT: "SPLIT";
16
+ readonly CACHED: "CACHED";
17
+ readonly DISABLED: "DISABLED";
18
+ readonly UNKNOWN: "UNKNOWN";
19
+ readonly STALE: "STALE";
20
+ readonly ERROR: "ERROR";
21
+ };
22
+ export declare enum ErrorCode {
23
+ PROVIDER_NOT_READY = "PROVIDER_NOT_READY",
24
+ PROVIDER_FATAL = "PROVIDER_FATAL",
25
+ FLAG_NOT_FOUND = "FLAG_NOT_FOUND",
26
+ PARSE_ERROR = "PARSE_ERROR",
27
+ TYPE_MISMATCH = "TYPE_MISMATCH",
28
+ TARGETING_KEY_MISSING = "TARGETING_KEY_MISSING",
29
+ INVALID_CONTEXT = "INVALID_CONTEXT",
30
+ GENERAL = "GENERAL"
31
+ }
32
+ export interface Logger {
33
+ error(...args: unknown[]): void;
34
+ warn(...args: unknown[]): void;
35
+ info(...args: unknown[]): void;
36
+ debug(...args: unknown[]): void;
37
+ }
38
+ export type ResolutionReason = keyof typeof StandardResolutionReasons | (string & Record<never, never>);
39
+ export type EvaluationContextValue = PrimitiveValue | Date | {
40
+ [key: string]: EvaluationContextValue;
41
+ } | EvaluationContextValue[];
42
+ export type EvaluationContext = {
43
+ targetingKey?: string;
44
+ } & Record<string, EvaluationContextValue>;
45
+ export interface ProviderMetadata extends Readonly<Metadata> {
46
+ readonly name: string;
47
+ }
48
+ export interface ClientMetadata {
49
+ readonly name?: string;
50
+ readonly domain?: string;
51
+ readonly version?: string;
52
+ readonly providerMetadata: ProviderMetadata;
53
+ }
54
+ export type HookHints = Readonly<Record<string, unknown>>;
55
+ export interface HookContext<T extends FlagValue = FlagValue> {
56
+ readonly flagKey: string;
57
+ readonly defaultValue: T;
58
+ readonly flagValueType: FlagValueType;
59
+ readonly context: Readonly<EvaluationContext>;
60
+ readonly clientMetadata: ClientMetadata;
61
+ readonly providerMetadata: ProviderMetadata;
62
+ readonly logger: Logger;
63
+ }
64
+ export interface BeforeHookContext extends HookContext {
65
+ context: EvaluationContext;
66
+ }
67
+ export type ResolutionDetails<U> = {
68
+ value: U;
69
+ variant?: string;
70
+ flagMetadata?: FlagMetadata;
71
+ reason?: ResolutionReason;
72
+ errorCode?: ErrorCode;
73
+ errorMessage?: string;
74
+ };
75
+ export type EvaluationDetails<T extends FlagValue> = {
76
+ flagKey: string;
77
+ flagMetadata: Readonly<FlagMetadata>;
78
+ } & ResolutionDetails<T>;
79
+ export interface BaseHook<T extends FlagValue = FlagValue, BeforeHookReturn = unknown, HooksReturn = unknown> {
80
+ before?(hookContext: BeforeHookContext, hookHints?: HookHints): BeforeHookReturn;
81
+ after?(hookContext: Readonly<HookContext<T>>, evaluationDetails: EvaluationDetails<T>, hookHints?: HookHints): HooksReturn;
82
+ error?(hookContext: Readonly<HookContext<T>>, error: unknown, hookHints?: HookHints): HooksReturn;
83
+ finally?(hookContext: Readonly<HookContext<T>>, hookHints?: HookHints): HooksReturn;
84
+ }
85
+ export type OpenFeatureHook = BaseHook<FlagValue, void, void>;
86
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/openfeature/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACvE,MAAM,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;AACpC,MAAM,MAAM,UAAU,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AACtD,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG,UAAU,GAAG,SAAS,CAAC;AAChE,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9C,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAC9D,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AACrE,eAAO,MAAM,yBAAyB;;;;;;;;;;CAU5B,CAAC;AACX,oBAAY,SAAS;IACnB,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;I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iBAAiB,CAAC,CAAC,CAAC,EACvC,SAAS,CAAC,EAAE,SAAS,GACpB,WAAW,CAAC;IACf,KAAK,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClG,OAAO,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CACrF;AACD,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"reportingobserver.d.ts","sourceRoot":"","sources":["../../../../src/integrations/reportingobserver.ts"],"names":[],"mappings":"AAqBA,KAAK,WAAW,GAAG,OAAO,GAAG,aAAa,GAAG,cAAc,CAAC;AA6B5D,UAAU,wBAAwB;IAChC,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;CACvB;AA+ED;;GAEG;AACH,eAAO,MAAM,4BAA4B,wFAAmD,CAAC"}
1
+ {"version":3,"file":"reportingobserver.d.ts","sourceRoot":"","sources":["../../../../src/integrations/reportingobserver.ts"],"names":[],"mappings":"AAqBA,KAAK,WAAW,GAAG,OAAO,GAAG,aAAa,GAAG,cAAc,CAAC;AA6B5D,UAAU,wBAAwB;IAChC,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;CACvB;AAkFD;;GAEG;AACH,eAAO,MAAM,4BAA4B,wFAAmD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { Client, DsnLike, Integration, Options, UserFeedback } from '@sentry/core';
2
2
  import type { BrowserOptions } from './client';
3
3
  /** Get the default integrations for the browser SDK. */
4
- export declare function getDefaultIntegrations(_options: Options): Integration[];
4
+ export declare function getDefaultIntegrations(options: Options): Integration[];
5
5
  /**
6
6
  * The Sentry Browser SDK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