@sentry/browser 10.37.0 → 10.39.0-alpha.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 (167) hide show
  1. package/build/npm/cjs/dev/client.js +7 -0
  2. package/build/npm/cjs/dev/client.js.map +1 -1
  3. package/build/npm/cjs/dev/index.js +21 -16
  4. package/build/npm/cjs/dev/index.js.map +1 -1
  5. package/build/npm/cjs/dev/integrations/browsersession.js +13 -9
  6. package/build/npm/cjs/dev/integrations/browsersession.js.map +1 -1
  7. package/build/npm/cjs/dev/integrations/culturecontext.js +64 -0
  8. package/build/npm/cjs/dev/integrations/culturecontext.js.map +1 -0
  9. package/build/npm/cjs/dev/integrations/httpcontext.js +25 -1
  10. package/build/npm/cjs/dev/integrations/httpcontext.js.map +1 -1
  11. package/build/npm/cjs/dev/integrations/spanstreaming.js +87 -0
  12. package/build/npm/cjs/dev/integrations/spanstreaming.js.map +1 -0
  13. package/build/npm/cjs/dev/integrations/spotlight.js +5 -4
  14. package/build/npm/cjs/dev/integrations/spotlight.js.map +1 -1
  15. package/build/npm/cjs/dev/integrations/webWorker.js +31 -2
  16. package/build/npm/cjs/dev/integrations/webWorker.js.map +1 -1
  17. package/build/npm/cjs/dev/profiling/UIProfiler.js +10 -0
  18. package/build/npm/cjs/dev/profiling/UIProfiler.js.map +1 -1
  19. package/build/npm/cjs/dev/profiling/integration.js +10 -0
  20. package/build/npm/cjs/dev/profiling/integration.js.map +1 -1
  21. package/build/npm/cjs/dev/sdk.js +2 -0
  22. package/build/npm/cjs/dev/sdk.js.map +1 -1
  23. package/build/npm/cjs/dev/tracing/browserTracingIntegration.js +18 -11
  24. package/build/npm/cjs/dev/tracing/browserTracingIntegration.js.map +1 -1
  25. package/build/npm/cjs/dev/tracing/linkedTraces.js +1 -0
  26. package/build/npm/cjs/dev/tracing/linkedTraces.js.map +1 -1
  27. package/build/npm/cjs/dev/tracing/request.js +1 -0
  28. package/build/npm/cjs/dev/tracing/request.js.map +1 -1
  29. package/build/npm/cjs/prod/client.js +7 -0
  30. package/build/npm/cjs/prod/client.js.map +1 -1
  31. package/build/npm/cjs/prod/index.js +21 -16
  32. package/build/npm/cjs/prod/index.js.map +1 -1
  33. package/build/npm/cjs/prod/integrations/browsersession.js +13 -9
  34. package/build/npm/cjs/prod/integrations/browsersession.js.map +1 -1
  35. package/build/npm/cjs/prod/integrations/culturecontext.js +64 -0
  36. package/build/npm/cjs/prod/integrations/culturecontext.js.map +1 -0
  37. package/build/npm/cjs/prod/integrations/httpcontext.js +25 -1
  38. package/build/npm/cjs/prod/integrations/httpcontext.js.map +1 -1
  39. package/build/npm/cjs/prod/integrations/spanstreaming.js +87 -0
  40. package/build/npm/cjs/prod/integrations/spanstreaming.js.map +1 -0
  41. package/build/npm/cjs/prod/integrations/spotlight.js +5 -4
  42. package/build/npm/cjs/prod/integrations/spotlight.js.map +1 -1
  43. package/build/npm/cjs/prod/integrations/webWorker.js +31 -2
  44. package/build/npm/cjs/prod/integrations/webWorker.js.map +1 -1
  45. package/build/npm/cjs/prod/profiling/UIProfiler.js +10 -0
  46. package/build/npm/cjs/prod/profiling/UIProfiler.js.map +1 -1
  47. package/build/npm/cjs/prod/profiling/integration.js +10 -0
  48. package/build/npm/cjs/prod/profiling/integration.js.map +1 -1
  49. package/build/npm/cjs/prod/sdk.js +2 -0
  50. package/build/npm/cjs/prod/sdk.js.map +1 -1
  51. package/build/npm/cjs/prod/tracing/browserTracingIntegration.js +18 -11
  52. package/build/npm/cjs/prod/tracing/browserTracingIntegration.js.map +1 -1
  53. package/build/npm/cjs/prod/tracing/linkedTraces.js +1 -0
  54. package/build/npm/cjs/prod/tracing/linkedTraces.js.map +1 -1
  55. package/build/npm/cjs/prod/tracing/request.js +1 -0
  56. package/build/npm/cjs/prod/tracing/request.js.map +1 -1
  57. package/build/npm/esm/dev/client.js +7 -0
  58. package/build/npm/esm/dev/client.js.map +1 -1
  59. package/build/npm/esm/dev/index.js +4 -2
  60. package/build/npm/esm/dev/index.js.map +1 -1
  61. package/build/npm/esm/dev/integrations/browsersession.js +13 -9
  62. package/build/npm/esm/dev/integrations/browsersession.js.map +1 -1
  63. package/build/npm/esm/dev/integrations/culturecontext.js +62 -0
  64. package/build/npm/esm/dev/integrations/culturecontext.js.map +1 -0
  65. package/build/npm/esm/dev/integrations/httpcontext.js +26 -2
  66. package/build/npm/esm/dev/integrations/httpcontext.js.map +1 -1
  67. package/build/npm/esm/dev/integrations/spanstreaming.js +85 -0
  68. package/build/npm/esm/dev/integrations/spanstreaming.js.map +1 -0
  69. package/build/npm/esm/dev/integrations/spotlight.js +5 -4
  70. package/build/npm/esm/dev/integrations/spotlight.js.map +1 -1
  71. package/build/npm/esm/dev/integrations/webWorker.js +32 -3
  72. package/build/npm/esm/dev/integrations/webWorker.js.map +1 -1
  73. package/build/npm/esm/dev/package.json +1 -1
  74. package/build/npm/esm/dev/profiling/UIProfiler.js +10 -0
  75. package/build/npm/esm/dev/profiling/UIProfiler.js.map +1 -1
  76. package/build/npm/esm/dev/profiling/integration.js +10 -0
  77. package/build/npm/esm/dev/profiling/integration.js.map +1 -1
  78. package/build/npm/esm/dev/sdk.js +2 -0
  79. package/build/npm/esm/dev/sdk.js.map +1 -1
  80. package/build/npm/esm/dev/tracing/browserTracingIntegration.js +19 -13
  81. package/build/npm/esm/dev/tracing/browserTracingIntegration.js.map +1 -1
  82. package/build/npm/esm/dev/tracing/linkedTraces.js +1 -0
  83. package/build/npm/esm/dev/tracing/linkedTraces.js.map +1 -1
  84. package/build/npm/esm/dev/tracing/request.js +2 -1
  85. package/build/npm/esm/dev/tracing/request.js.map +1 -1
  86. package/build/npm/esm/prod/client.js +7 -0
  87. package/build/npm/esm/prod/client.js.map +1 -1
  88. package/build/npm/esm/prod/index.js +4 -2
  89. package/build/npm/esm/prod/index.js.map +1 -1
  90. package/build/npm/esm/prod/integrations/browsersession.js +13 -9
  91. package/build/npm/esm/prod/integrations/browsersession.js.map +1 -1
  92. package/build/npm/esm/prod/integrations/culturecontext.js +62 -0
  93. package/build/npm/esm/prod/integrations/culturecontext.js.map +1 -0
  94. package/build/npm/esm/prod/integrations/httpcontext.js +26 -2
  95. package/build/npm/esm/prod/integrations/httpcontext.js.map +1 -1
  96. package/build/npm/esm/prod/integrations/spanstreaming.js +85 -0
  97. package/build/npm/esm/prod/integrations/spanstreaming.js.map +1 -0
  98. package/build/npm/esm/prod/integrations/spotlight.js +5 -4
  99. package/build/npm/esm/prod/integrations/spotlight.js.map +1 -1
  100. package/build/npm/esm/prod/integrations/webWorker.js +32 -3
  101. package/build/npm/esm/prod/integrations/webWorker.js.map +1 -1
  102. package/build/npm/esm/prod/package.json +1 -1
  103. package/build/npm/esm/prod/profiling/UIProfiler.js +10 -0
  104. package/build/npm/esm/prod/profiling/UIProfiler.js.map +1 -1
  105. package/build/npm/esm/prod/profiling/integration.js +10 -0
  106. package/build/npm/esm/prod/profiling/integration.js.map +1 -1
  107. package/build/npm/esm/prod/sdk.js +2 -0
  108. package/build/npm/esm/prod/sdk.js.map +1 -1
  109. package/build/npm/esm/prod/tracing/browserTracingIntegration.js +19 -13
  110. package/build/npm/esm/prod/tracing/browserTracingIntegration.js.map +1 -1
  111. package/build/npm/esm/prod/tracing/linkedTraces.js +1 -0
  112. package/build/npm/esm/prod/tracing/linkedTraces.js.map +1 -1
  113. package/build/npm/esm/prod/tracing/request.js +2 -1
  114. package/build/npm/esm/prod/tracing/request.js.map +1 -1
  115. package/build/npm/types/client.d.ts.map +1 -1
  116. package/build/npm/types/exports.d.ts +1 -0
  117. package/build/npm/types/exports.d.ts.map +1 -1
  118. package/build/npm/types/index.bundle.logs.metrics.d.ts +5 -0
  119. package/build/npm/types/index.bundle.logs.metrics.d.ts.map +1 -0
  120. package/build/npm/types/index.bundle.replay.logs.metrics.d.ts +6 -0
  121. package/build/npm/types/index.bundle.replay.logs.metrics.d.ts.map +1 -0
  122. package/build/npm/types/index.bundle.tracing.d.ts +2 -1
  123. package/build/npm/types/index.bundle.tracing.d.ts.map +1 -1
  124. package/build/npm/types/index.bundle.tracing.logs.metrics.d.ts +2 -1
  125. package/build/npm/types/index.bundle.tracing.logs.metrics.d.ts.map +1 -1
  126. package/build/npm/types/index.bundle.tracing.replay.d.ts +2 -1
  127. package/build/npm/types/index.bundle.tracing.replay.d.ts.map +1 -1
  128. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts +2 -1
  129. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts.map +1 -1
  130. package/build/npm/types/index.bundle.tracing.replay.feedback.logs.metrics.d.ts +2 -1
  131. package/build/npm/types/index.bundle.tracing.replay.feedback.logs.metrics.d.ts.map +1 -1
  132. package/build/npm/types/index.bundle.tracing.replay.logs.metrics.d.ts +11 -0
  133. package/build/npm/types/index.bundle.tracing.replay.logs.metrics.d.ts.map +1 -0
  134. package/build/npm/types/index.d.ts +3 -2
  135. package/build/npm/types/index.d.ts.map +1 -1
  136. package/build/npm/types/integrations/browsersession.d.ts +16 -1
  137. package/build/npm/types/integrations/browsersession.d.ts.map +1 -1
  138. package/build/npm/types/integrations/culturecontext.d.ts +16 -0
  139. package/build/npm/types/integrations/culturecontext.d.ts.map +1 -0
  140. package/build/npm/types/integrations/httpcontext.d.ts.map +1 -1
  141. package/build/npm/types/integrations/spanstreaming.d.ts +5 -0
  142. package/build/npm/types/integrations/spanstreaming.d.ts.map +1 -0
  143. package/build/npm/types/integrations/spotlight.d.ts.map +1 -1
  144. package/build/npm/types/integrations/webWorker.d.ts.map +1 -1
  145. package/build/npm/types/profiling/UIProfiler.d.ts +4 -0
  146. package/build/npm/types/profiling/UIProfiler.d.ts.map +1 -1
  147. package/build/npm/types/profiling/integration.d.ts.map +1 -1
  148. package/build/npm/types/sdk.d.ts.map +1 -1
  149. package/build/npm/types/tracing/browserTracingIntegration.d.ts +10 -0
  150. package/build/npm/types/tracing/browserTracingIntegration.d.ts.map +1 -1
  151. package/build/npm/types/tracing/request.d.ts.map +1 -1
  152. package/build/npm/types-ts3.8/exports.d.ts +1 -0
  153. package/build/npm/types-ts3.8/index.bundle.logs.metrics.d.ts +5 -0
  154. package/build/npm/types-ts3.8/index.bundle.replay.logs.metrics.d.ts +6 -0
  155. package/build/npm/types-ts3.8/index.bundle.tracing.d.ts +2 -1
  156. package/build/npm/types-ts3.8/index.bundle.tracing.logs.metrics.d.ts +2 -1
  157. package/build/npm/types-ts3.8/index.bundle.tracing.replay.d.ts +2 -1
  158. package/build/npm/types-ts3.8/index.bundle.tracing.replay.feedback.d.ts +2 -1
  159. package/build/npm/types-ts3.8/index.bundle.tracing.replay.feedback.logs.metrics.d.ts +2 -1
  160. package/build/npm/types-ts3.8/index.bundle.tracing.replay.logs.metrics.d.ts +11 -0
  161. package/build/npm/types-ts3.8/index.d.ts +3 -2
  162. package/build/npm/types-ts3.8/integrations/browsersession.d.ts +16 -1
  163. package/build/npm/types-ts3.8/integrations/culturecontext.d.ts +16 -0
  164. package/build/npm/types-ts3.8/integrations/spanstreaming.d.ts +5 -0
  165. package/build/npm/types-ts3.8/profiling/UIProfiler.d.ts +4 -0
  166. package/build/npm/types-ts3.8/tracing/browserTracingIntegration.d.ts +10 -0
  167. package/package.json +7 -7
@@ -0,0 +1,11 @@
1
+ import { feedbackIntegrationShim } from '@sentry-internal/integration-shims';
2
+ export * from './index.bundle.base';
3
+ export { logger, consoleLoggingIntegration } from '@sentry/core';
4
+ export { getActiveSpan, getRootSpan, getSpanDescendants, setMeasurement, startInactiveSpan, startNewTrace, startSpan, startSpanManual, withActiveSpan, withStreamSpan, } from '@sentry/core';
5
+ export { spanStreamingIntegration } from './integrations/spanstreaming';
6
+ export { browserTracingIntegration, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan, } from './tracing/browserTracingIntegration';
7
+ export { reportPageLoaded } from './tracing/reportPageLoaded';
8
+ export { setActiveSpanInBrowser } from './tracing/setActiveSpan';
9
+ export { feedbackIntegrationShim as feedbackAsyncIntegration, feedbackIntegrationShim as feedbackIntegration };
10
+ export { replayIntegration, getReplay } from '@sentry-internal/replay';
11
+ //# sourceMappingURL=index.bundle.tracing.replay.logs.metrics.d.ts.map
@@ -16,12 +16,12 @@ export { browserTracingIntegration, startBrowserTracingNavigationSpan, startBrow
16
16
  export { reportPageLoaded } from './tracing/reportPageLoaded';
17
17
  export { setActiveSpanInBrowser } from './tracing/setActiveSpan';
18
18
  export { RequestInstrumentationOptions } from './tracing/request';
19
- export { registerSpanErrorInstrumentation, getActiveSpan, getRootSpan, startSpan, startInactiveSpan, startSpanManual, withActiveSpan, startNewTrace, getSpanDescendants, setMeasurement, getSpanStatusFromHttpCode, setHttpStatus, makeMultiplexedTransport, MULTIPLEXED_TRANSPORT_EXTRA_KEY, moduleMetadataIntegration, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, thirdPartyErrorFilterIntegration, featureFlagsIntegration, instrumentAnthropicAiClient, instrumentOpenAiClient, instrumentGoogleGenAIClient, instrumentLangGraph, createLangChainCallbackHandler, logger, } from '@sentry/core';
19
+ export { registerSpanErrorInstrumentation, getActiveSpan, getRootSpan, startSpan, startInactiveSpan, startSpanManual, withActiveSpan, withStreamSpan, startNewTrace, getSpanDescendants, setMeasurement, getSpanStatusFromHttpCode, setHttpStatus, makeMultiplexedTransport, MULTIPLEXED_TRANSPORT_EXTRA_KEY, moduleMetadataIntegration, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, thirdPartyErrorFilterIntegration, featureFlagsIntegration, instrumentAnthropicAiClient, instrumentOpenAiClient, instrumentGoogleGenAIClient, instrumentLangGraph, createLangChainCallbackHandler, logger, } from '@sentry/core';
20
20
  export { Span, FeatureFlagsIntegration } from '@sentry/core';
21
21
  export { makeBrowserOfflineTransport } from './transports/offline';
22
22
  export { browserProfilingIntegration } from './profiling/integration';
23
23
  export { spotlightBrowserIntegration } from './integrations/spotlight';
24
- export { browserSessionIntegration } from './integrations/browsersession';
24
+ export { cultureContextIntegration } from './integrations/culturecontext';
25
25
  export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler } from './integrations/featureFlags/launchdarkly';
26
26
  export { openFeatureIntegration, OpenFeatureIntegrationHook } from './integrations/featureFlags/openfeature';
27
27
  export { unleashIntegration } from './integrations/featureFlags/unleash';
@@ -29,4 +29,5 @@ export { growthbookIntegration } from './integrations/featureFlags/growthbook';
29
29
  export { statsigIntegration } from './integrations/featureFlags/statsig';
30
30
  export { diagnoseSdkConnectivity } from './diagnose-sdk';
31
31
  export { webWorkerIntegration, registerWebWorker } from './integrations/webWorker';
32
+ export { spanStreamingIntegration } from './integrations/spanstreaming';
32
33
  //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,23 @@
1
+ interface BrowserSessionOptions {
2
+ /**
3
+ * Controls the session lifecycle - when new sessions are created.
4
+ *
5
+ * - `'route'`: A session is created on page load and on every navigation.
6
+ * This is the default behavior.
7
+ * - `'page'`: A session is created once when the page is loaded. Session is not
8
+ * updated on navigation. This is useful for webviews or single-page apps where
9
+ * URL changes should not trigger new sessions.
10
+ *
11
+ * @default 'route'
12
+ */
13
+ lifecycle?: 'route' | 'page';
14
+ }
1
15
  /**
2
16
  * When added, automatically creates sessions which allow you to track adoption and crashes (crash free rate) in your Releases in Sentry.
3
17
  * More information: https://docs.sentry.io/product/releases/health/
4
18
  *
5
19
  * Note: In order for session tracking to work, you need to set up Releases: https://docs.sentry.io/product/releases/
6
20
  */
7
- export declare const browserSessionIntegration: () => import("@sentry/core").Integration;
21
+ export declare const browserSessionIntegration: (options?: BrowserSessionOptions | undefined) => import("@sentry/core").Integration;
22
+ export {};
8
23
  //# sourceMappingURL=browsersession.d.ts.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Captures culture context from the browser.
3
+ *
4
+ * Enabled by default.
5
+ *
6
+ * @example
7
+ * ```js
8
+ * import * as Sentry from '@sentry/browser';
9
+ *
10
+ * Sentry.init({
11
+ * integrations: [Sentry.cultureContextIntegration()],
12
+ * });
13
+ * ```
14
+ */
15
+ export declare const cultureContextIntegration: () => import("@sentry/core").Integration;
16
+ //# sourceMappingURL=culturecontext.d.ts.map
@@ -0,0 +1,5 @@
1
+ export interface SpanStreamingOptions {
2
+ batchLimit: number;
3
+ }
4
+ export declare const spanStreamingIntegration: (userOptions?: Partial<SpanStreamingOptions> | undefined) => import("@sentry/core").Integration;
5
+ //# sourceMappingURL=spanstreaming.d.ts.map
@@ -28,6 +28,10 @@ export declare class UIProfiler implements ContinuousProfiler<Client> {
28
28
  start(): void;
29
29
  /** Stops UI profiling (only effective in 'manual' mode). */
30
30
  stop(): void;
31
+ /** Returns the current profiler session ID, or undefined if not initialized. */
32
+ getProfilerId(): string | undefined;
33
+ /** Returns whether the profiler is currently running (recording). */
34
+ isRunning(): boolean;
31
35
  /** Handle an already-active root span at integration setup time (used only in trace mode). */
32
36
  notifyRootSpanActive(rootSpan: Span): void;
33
37
  /**
@@ -203,7 +203,15 @@ export interface BrowserTracingOptions {
203
203
  */
204
204
  _experiments: Partial<{
205
205
  enableInteractions: boolean;
206
+ /**
207
+ * @deprecated To send CLS values as spans, set `traceLifecycle` to `stream` or
208
+ * register the `spanStreamingIntegration` integration in `Sentry.init()` instead.
209
+ */
206
210
  enableStandaloneClsSpans: boolean;
211
+ /**
212
+ * @deprecated To send LCP values as spans, set `traceLifecycle` to `stream` or
213
+ * register the `spanStreamingIntegration` integration in `Sentry.init()` instead.
214
+ */
207
215
  enableStandaloneLcpSpans: boolean;
208
216
  }>;
209
217
  /**
@@ -264,4 +272,6 @@ export declare function startBrowserTracingNavigationSpan(client: Client, spanOp
264
272
  }): Span | undefined;
265
273
  /** Returns the value of a meta tag */
266
274
  export declare function getMetaContent(metaName: string): string | undefined;
275
+ /** Returns the description of a server timing entry */
276
+ export declare function getServerTiming(name: string): string | undefined;
267
277
  //# sourceMappingURL=browserTracingIntegration.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/browser",
3
- "version": "10.37.0",
3
+ "version": "10.39.0-alpha.0",
4
4
  "description": "Official Sentry SDK for browsers",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
@@ -44,14 +44,14 @@
44
44
  "access": "public"
45
45
  },
46
46
  "dependencies": {
47
- "@sentry-internal/browser-utils": "10.37.0",
48
- "@sentry-internal/feedback": "10.37.0",
49
- "@sentry-internal/replay": "10.37.0",
50
- "@sentry-internal/replay-canvas": "10.37.0",
51
- "@sentry/core": "10.37.0"
47
+ "@sentry-internal/browser-utils": "10.39.0-alpha.0",
48
+ "@sentry-internal/feedback": "10.39.0-alpha.0",
49
+ "@sentry-internal/replay": "10.39.0-alpha.0",
50
+ "@sentry-internal/replay-canvas": "10.39.0-alpha.0",
51
+ "@sentry/core": "10.39.0-alpha.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@sentry-internal/integration-shims": "10.37.0",
54
+ "@sentry-internal/integration-shims": "10.39.0-alpha.0",
55
55
  "fake-indexeddb": "^6.2.4"
56
56
  },
57
57
  "scripts": {