@sentry/browser 10.8.0 → 10.11.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 (41) hide show
  1. package/build/npm/cjs/client.js.map +1 -1
  2. package/build/npm/cjs/helpers.js +1 -0
  3. package/build/npm/cjs/helpers.js.map +1 -1
  4. package/build/npm/cjs/integrations/browserapierrors.js +5 -10
  5. package/build/npm/cjs/integrations/browserapierrors.js.map +1 -1
  6. package/build/npm/cjs/integrations/httpclient.js +3 -1
  7. package/build/npm/cjs/integrations/httpclient.js.map +1 -1
  8. package/build/npm/cjs/tracing/browserTracingIntegration.js +2 -1
  9. package/build/npm/cjs/tracing/browserTracingIntegration.js.map +1 -1
  10. package/build/npm/cjs/tracing/request.js +29 -9
  11. package/build/npm/cjs/tracing/request.js.map +1 -1
  12. package/build/npm/esm/client.js.map +1 -1
  13. package/build/npm/esm/helpers.js +1 -0
  14. package/build/npm/esm/helpers.js.map +1 -1
  15. package/build/npm/esm/integrations/browserapierrors.js +5 -10
  16. package/build/npm/esm/integrations/browserapierrors.js.map +1 -1
  17. package/build/npm/esm/integrations/httpclient.js +3 -1
  18. package/build/npm/esm/integrations/httpclient.js.map +1 -1
  19. package/build/npm/esm/package.json +1 -1
  20. package/build/npm/esm/tracing/browserTracingIntegration.js +2 -1
  21. package/build/npm/esm/tracing/browserTracingIntegration.js.map +1 -1
  22. package/build/npm/esm/tracing/request.js +30 -9
  23. package/build/npm/esm/tracing/request.js.map +1 -1
  24. package/build/npm/types/client.d.ts +19 -7
  25. package/build/npm/types/client.d.ts.map +1 -1
  26. package/build/npm/types/helpers.d.ts.map +1 -1
  27. package/build/npm/types/index.bundle.feedback.d.ts +1 -1
  28. package/build/npm/types/index.bundle.feedback.d.ts.map +1 -1
  29. package/build/npm/types/index.bundle.replay.feedback.d.ts +7 -0
  30. package/build/npm/types/index.bundle.replay.feedback.d.ts.map +1 -0
  31. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts +1 -1
  32. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts.map +1 -1
  33. package/build/npm/types/tracing/browserTracingIntegration.d.ts.map +1 -1
  34. package/build/npm/types/tracing/request.d.ts +1 -7
  35. package/build/npm/types/tracing/request.d.ts.map +1 -1
  36. package/build/npm/types-ts3.8/client.d.ts +19 -7
  37. package/build/npm/types-ts3.8/index.bundle.feedback.d.ts +1 -1
  38. package/build/npm/types-ts3.8/index.bundle.replay.feedback.d.ts +7 -0
  39. package/build/npm/types-ts3.8/index.bundle.tracing.replay.feedback.d.ts +1 -1
  40. package/build/npm/types-ts3.8/tracing/request.d.ts +1 -7
  41. package/package.json +7 -7
@@ -1,15 +1,9 @@
1
- import { BrowserClientProfilingOptions, BrowserClientReplayOptions, ClientOptions, Event, EventHint, Options, ParameterizedString, Scope, SeverityLevel } from '@sentry/core';
1
+ import { BrowserClientProfilingOptions, BrowserClientReplayOptions, ClientOptions, Event, EventHint, Options as CoreOptions, ParameterizedString, Scope, SeverityLevel } from '@sentry/core';
2
2
  import { Client } from '@sentry/core';
3
3
  import { BrowserTransportOptions } from './transports/types';
4
4
  type BrowserSpecificOptions = BrowserClientReplayOptions & BrowserClientProfilingOptions & {
5
5
  /** If configured, this URL will be used as base URL for lazy loading integration. */
6
6
  cdnBaseUrl?: string;
7
- };
8
- /**
9
- * Configuration options for the Sentry Browser SDK.
10
- * @see @sentry/core Options for more information.
11
- */
12
- export type BrowserOptions = Options<BrowserTransportOptions> & BrowserSpecificOptions & {
13
7
  /**
14
8
  * Important: Only set this option if you know what you are doing!
15
9
  *
@@ -28,7 +22,25 @@ export type BrowserOptions = Options<BrowserTransportOptions> & BrowserSpecificO
28
22
  * @default false
29
23
  */
30
24
  skipBrowserExtensionCheck?: boolean;
25
+ /**
26
+ * If set to `true`, the SDK propagates the W3C `traceparent` header to any outgoing requests,
27
+ * in addition to the `sentry-trace` and `baggage` headers. Use the {@link CoreOptions.tracePropagationTargets}
28
+ * option to control to which outgoing requests the header will be attached.
29
+ *
30
+ * **Important:** If you set this option to `true`, make sure that you configured your servers'
31
+ * CORS settings to allow the `traceparent` header. Otherwise, requests might get blocked.
32
+ *
33
+ * @see https://www.w3.org/TR/trace-context/
34
+ *
35
+ * @default false
36
+ */
37
+ propagateTraceparent?: boolean;
31
38
  };
39
+ /**
40
+ * Configuration options for the Sentry Browser SDK.
41
+ * @see @sentry/core Options for more information.
42
+ */
43
+ export type BrowserOptions = CoreOptions<BrowserTransportOptions> & BrowserSpecificOptions;
32
44
  /**
33
45
  * Configuration options for the Sentry Browser SDK Client class
34
46
  * @see BrowserClient for more information.
@@ -1,6 +1,6 @@
1
1
  import { browserTracingIntegrationShim, replayIntegrationShim } from '@sentry-internal/integration-shims';
2
2
  import { feedbackAsyncIntegration } from './feedbackAsync';
3
3
  export * from './index.bundle.base';
4
- export { getFeedback } from '@sentry-internal/feedback';
4
+ export { getFeedback, sendFeedback } from '@sentry-internal/feedback';
5
5
  export { browserTracingIntegrationShim as browserTracingIntegration, feedbackAsyncIntegration as feedbackAsyncIntegration, feedbackAsyncIntegration as feedbackIntegration, replayIntegrationShim as replayIntegration, };
6
6
  //# sourceMappingURL=index.bundle.feedback.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { browserTracingIntegrationShim } from '@sentry-internal/integration-shims';
2
+ import { feedbackAsyncIntegration } from './feedbackAsync';
3
+ export * from './index.bundle.base';
4
+ export { getFeedback, sendFeedback } from '@sentry-internal/feedback';
5
+ export { browserTracingIntegrationShim as browserTracingIntegration, feedbackAsyncIntegration as feedbackAsyncIntegration, feedbackAsyncIntegration as feedbackIntegration, };
6
+ export { replayIntegration, getReplay } from '@sentry-internal/replay';
7
+ //# sourceMappingURL=index.bundle.replay.feedback.d.ts.map
@@ -2,7 +2,7 @@ import { feedbackAsyncIntegration } from './feedbackAsync';
2
2
  export * from './index.bundle.base';
3
3
  export { getActiveSpan, getRootSpan, startSpan, startInactiveSpan, startSpanManual, startNewTrace, withActiveSpan, getSpanDescendants, setMeasurement, } from '@sentry/core';
4
4
  export { browserTracingIntegration, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan, } from './tracing/browserTracingIntegration';
5
- export { getFeedback } from '@sentry-internal/feedback';
5
+ export { getFeedback, sendFeedback } from '@sentry-internal/feedback';
6
6
  export { feedbackAsyncIntegration as feedbackAsyncIntegration, feedbackAsyncIntegration as feedbackIntegration };
7
7
  export { replayIntegration, getReplay } from '@sentry-internal/replay';
8
8
  //# sourceMappingURL=index.bundle.tracing.replay.feedback.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Client, HandlerDataXhr, Span, WebFetchHeaders } from '@sentry/core';
1
+ import { Client, Span, WebFetchHeaders } from '@sentry/core';
2
2
  /** Options for Request Instrumentation */
3
3
  export interface RequestInstrumentationOptions {
4
4
  /**
@@ -79,10 +79,4 @@ export declare function instrumentOutgoingRequests(client: Client, _options?: Pa
79
79
  * We only export this function for testing purposes.
80
80
  */
81
81
  export declare function shouldAttachHeaders(targetUrl: string, tracePropagationTargets: (string | RegExp)[] | undefined): boolean;
82
- /**
83
- * Create and track xhr request spans
84
- *
85
- * @returns Span if a span was created, otherwise void.
86
- */
87
- export declare function xhrCallback(handlerData: HandlerDataXhr, shouldCreateSpan: (url: string) => boolean, shouldAttachHeaders: (url: string) => boolean, spans: Record<string, Span>): Span | undefined;
88
82
  //# sourceMappingURL=request.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/browser",
3
- "version": "10.8.0",
3
+ "version": "10.11.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",
@@ -39,14 +39,14 @@
39
39
  "access": "public"
40
40
  },
41
41
  "dependencies": {
42
- "@sentry-internal/browser-utils": "10.8.0",
43
- "@sentry-internal/feedback": "10.8.0",
44
- "@sentry-internal/replay": "10.8.0",
45
- "@sentry-internal/replay-canvas": "10.8.0",
46
- "@sentry/core": "10.8.0"
42
+ "@sentry-internal/browser-utils": "10.11.0",
43
+ "@sentry-internal/feedback": "10.11.0",
44
+ "@sentry-internal/replay": "10.11.0",
45
+ "@sentry-internal/replay-canvas": "10.11.0",
46
+ "@sentry/core": "10.11.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@sentry-internal/integration-shims": "10.8.0",
49
+ "@sentry-internal/integration-shims": "10.11.0",
50
50
  "fake-indexeddb": "^4.0.1"
51
51
  },
52
52
  "scripts": {