@sentry/browser 10.20.0 → 10.21.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 (42) hide show
  1. package/build/npm/cjs/index.js +2 -0
  2. package/build/npm/cjs/index.js.map +1 -1
  3. package/build/npm/cjs/integrations/httpcontext.js +2 -0
  4. package/build/npm/cjs/integrations/httpcontext.js.map +1 -1
  5. package/build/npm/cjs/integrations/spanstreaming.js +252 -0
  6. package/build/npm/cjs/integrations/spanstreaming.js.map +1 -0
  7. package/build/npm/cjs/tracing/browserTracingIntegration.js +2 -0
  8. package/build/npm/cjs/tracing/browserTracingIntegration.js.map +1 -1
  9. package/build/npm/cjs/tracing/request.js +18 -36
  10. package/build/npm/cjs/tracing/request.js.map +1 -1
  11. package/build/npm/cjs/tracing/utils.js +54 -0
  12. package/build/npm/cjs/tracing/utils.js.map +1 -0
  13. package/build/npm/esm/index.js +1 -0
  14. package/build/npm/esm/index.js.map +1 -1
  15. package/build/npm/esm/integrations/httpcontext.js +2 -0
  16. package/build/npm/esm/integrations/httpcontext.js.map +1 -1
  17. package/build/npm/esm/integrations/spanstreaming.js +250 -0
  18. package/build/npm/esm/integrations/spanstreaming.js.map +1 -0
  19. package/build/npm/esm/package.json +1 -1
  20. package/build/npm/esm/tracing/browserTracingIntegration.js +2 -0
  21. package/build/npm/esm/tracing/browserTracingIntegration.js.map +1 -1
  22. package/build/npm/esm/tracing/request.js +15 -33
  23. package/build/npm/esm/tracing/request.js.map +1 -1
  24. package/build/npm/esm/tracing/utils.js +49 -0
  25. package/build/npm/esm/tracing/utils.js.map +1 -0
  26. package/build/npm/types/index.d.ts +1 -0
  27. package/build/npm/types/index.d.ts.map +1 -1
  28. package/build/npm/types/integrations/httpcontext.d.ts.map +1 -1
  29. package/build/npm/types/integrations/spanstreaming.d.ts +5 -0
  30. package/build/npm/types/integrations/spanstreaming.d.ts.map +1 -0
  31. package/build/npm/types/tracing/browserTracingIntegration.d.ts +6 -4
  32. package/build/npm/types/tracing/browserTracingIntegration.d.ts.map +1 -1
  33. package/build/npm/types/tracing/request.d.ts +6 -4
  34. package/build/npm/types/tracing/request.d.ts.map +1 -1
  35. package/build/npm/types/tracing/utils.d.ts +17 -0
  36. package/build/npm/types/tracing/utils.d.ts.map +1 -0
  37. package/build/npm/types-ts3.8/index.d.ts +1 -0
  38. package/build/npm/types-ts3.8/integrations/spanstreaming.d.ts +5 -0
  39. package/build/npm/types-ts3.8/tracing/browserTracingIntegration.d.ts +6 -4
  40. package/build/npm/types-ts3.8/tracing/request.d.ts +6 -4
  41. package/build/npm/types-ts3.8/tracing/utils.d.ts +17 -0
  42. package/package.json +7 -7
@@ -1,4 +1,4 @@
1
- import type { Client, Span, StartSpanOptions, WebFetchHeaders } from '@sentry/core';
1
+ import type { Client, RequestHookInfo, ResponseHookInfo, Span, StartSpanOptions } from '@sentry/core';
2
2
  export declare const BROWSER_TRACING_INTEGRATION_ID = "BrowserTracing";
3
3
  /** Options for Browser Tracing integration */
4
4
  export interface BrowserTracingOptions {
@@ -223,9 +223,11 @@ export interface BrowserTracingOptions {
223
223
  * You can use it to annotate the span with additional data or attributes, for example by setting
224
224
  * attributes based on the passed request headers.
225
225
  */
226
- onRequestSpanStart?(span: Span, requestInformation: {
227
- headers?: WebFetchHeaders;
228
- }): void;
226
+ onRequestSpanStart?(span: Span, requestInformation: RequestHookInfo): void;
227
+ /**
228
+ * Is called when spans end for outgoing requests, providing access to response headers.
229
+ */
230
+ onRequestSpanEnd?(span: Span, responseInformation: ResponseHookInfo): void;
229
231
  }
230
232
  /**
231
233
  * The Browser Tracing integration automatically instruments browser pageload/navigation
@@ -1 +1 @@
1
- {"version":3,"file":"browserTracingIntegration.d.ts","sourceRoot":"","sources":["../../../../src/tracing/browserTracingIntegration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAiB,IAAI,EAAE,gBAAgB,EAAqB,eAAe,EAAE,MAAM,cAAc,CAAC;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A;CAAE,GAC/C,IAAI,GAAG,SAAS,CAoBlB;AAED,sCAAsC;AACtC,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASnE"}
@@ -1,4 +1,4 @@
1
- import type { Client, Span, WebFetchHeaders } from '@sentry/core';
1
+ import type { Client, RequestHookInfo, ResponseHookInfo, Span } from '@sentry/core';
2
2
  /** Options for Request Instrumentation */
3
3
  export interface RequestInstrumentationOptions {
4
4
  /**
@@ -67,9 +67,11 @@ export interface RequestInstrumentationOptions {
67
67
  /**
68
68
  * Is called when spans are started for outgoing requests.
69
69
  */
70
- onRequestSpanStart?(span: Span, requestInformation: {
71
- headers?: WebFetchHeaders;
72
- }): void;
70
+ onRequestSpanStart?(span: Span, requestInformation: RequestHookInfo): void;
71
+ /**
72
+ * Is called when spans end for outgoing requests, providing access to response headers.
73
+ */
74
+ onRequestSpanEnd?(span: Span, responseInformation: ResponseHookInfo): void;
73
75
  }
74
76
  export declare const defaultRequestInstrumentationOptions: RequestInstrumentationOptions;
75
77
  /** Registers span creators for xhr and fetch requests */
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/tracing/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAA+C,IAAI,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AA8B/G,0CAA0C;AAC1C,MAAM,WAAW,6BAA6B;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,uBAAuB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAEjD;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;;;;;OAQG;IACH,2BAA2B,EAAE,OAAO,CAAC;IAErC;;;;OAIG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAE3B;;;;;OAKG;IACH,0BAA0B,CAAC,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EAAE,eAAe,GAAG,IAAI,CAAC;IAE3E;;OAEG;IACH,gBAAgB,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,mBAAmB,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC5E;AAKD,eAAO,MAAM,oCAAoC,EAAE,6BAKlD,CAAC;AAEF,0DAA0D;AAC1D,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,6BAA6B,CAAC,GAAG,IAAI,CA0GlH;AA2BD;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,uBAAuB,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,SAAS,GACvD,OAAO,CAqCT"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Checks if the baggage header has Sentry values.
3
+ */
4
+ export declare function baggageHeaderHasSentryValues(baggageHeader: string): boolean;
5
+ /**
6
+ * Gets the full URL from a given URL string.
7
+ */
8
+ export declare function getFullURL(url: string): string | undefined;
9
+ /**
10
+ * Checks if the entry is a PerformanceResourceTiming.
11
+ */
12
+ export declare function isPerformanceResourceTiming(entry: PerformanceEntry): entry is PerformanceResourceTiming;
13
+ /**
14
+ * Creates a Headers object from a record of string key-value pairs, and returns undefined if it fails.
15
+ */
16
+ export declare function createHeadersSafely(headers: Record<string, string> | undefined): Headers | undefined;
17
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/tracing/utils.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAE3E;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAS1D;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,gBAAgB,GAAG,KAAK,IAAI,yBAAyB,CAOvG;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAOpG"}
@@ -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
@@ -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
@@ -1,4 +1,4 @@
1
- import { Client, Span, StartSpanOptions, WebFetchHeaders } from '@sentry/core';
1
+ import { Client, RequestHookInfo, ResponseHookInfo, Span, StartSpanOptions } from '@sentry/core';
2
2
  export declare const BROWSER_TRACING_INTEGRATION_ID = "BrowserTracing";
3
3
  /** Options for Browser Tracing integration */
4
4
  export interface BrowserTracingOptions {
@@ -223,9 +223,11 @@ export interface BrowserTracingOptions {
223
223
  * You can use it to annotate the span with additional data or attributes, for example by setting
224
224
  * attributes based on the passed request headers.
225
225
  */
226
- onRequestSpanStart?(span: Span, requestInformation: {
227
- headers?: WebFetchHeaders;
228
- }): void;
226
+ onRequestSpanStart?(span: Span, requestInformation: RequestHookInfo): void;
227
+ /**
228
+ * Is called when spans end for outgoing requests, providing access to response headers.
229
+ */
230
+ onRequestSpanEnd?(span: Span, responseInformation: ResponseHookInfo): void;
229
231
  }
230
232
  /**
231
233
  * The Browser Tracing integration automatically instruments browser pageload/navigation
@@ -1,4 +1,4 @@
1
- import { Client, Span, WebFetchHeaders } from '@sentry/core';
1
+ import { Client, RequestHookInfo, ResponseHookInfo, Span } from '@sentry/core';
2
2
  /** Options for Request Instrumentation */
3
3
  export interface RequestInstrumentationOptions {
4
4
  /**
@@ -67,9 +67,11 @@ export interface RequestInstrumentationOptions {
67
67
  /**
68
68
  * Is called when spans are started for outgoing requests.
69
69
  */
70
- onRequestSpanStart?(span: Span, requestInformation: {
71
- headers?: WebFetchHeaders;
72
- }): void;
70
+ onRequestSpanStart?(span: Span, requestInformation: RequestHookInfo): void;
71
+ /**
72
+ * Is called when spans end for outgoing requests, providing access to response headers.
73
+ */
74
+ onRequestSpanEnd?(span: Span, responseInformation: ResponseHookInfo): void;
73
75
  }
74
76
  export declare const defaultRequestInstrumentationOptions: RequestInstrumentationOptions;
75
77
  /** Registers span creators for xhr and fetch requests */
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Checks if the baggage header has Sentry values.
3
+ */
4
+ export declare function baggageHeaderHasSentryValues(baggageHeader: string): boolean;
5
+ /**
6
+ * Gets the full URL from a given URL string.
7
+ */
8
+ export declare function getFullURL(url: string): string | undefined;
9
+ /**
10
+ * Checks if the entry is a PerformanceResourceTiming.
11
+ */
12
+ export declare function isPerformanceResourceTiming(entry: PerformanceEntry): entry is PerformanceResourceTiming;
13
+ /**
14
+ * Creates a Headers object from a record of string key-value pairs, and returns undefined if it fails.
15
+ */
16
+ export declare function createHeadersSafely(headers: Record<string, string> | undefined): Headers | undefined;
17
+ //# sourceMappingURL=utils.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/browser",
3
- "version": "10.20.0",
3
+ "version": "10.21.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",
@@ -39,14 +39,14 @@
39
39
  "access": "public"
40
40
  },
41
41
  "dependencies": {
42
- "@sentry-internal/browser-utils": "10.20.0",
43
- "@sentry-internal/feedback": "10.20.0",
44
- "@sentry-internal/replay": "10.20.0",
45
- "@sentry-internal/replay-canvas": "10.20.0",
46
- "@sentry/core": "10.20.0"
42
+ "@sentry-internal/browser-utils": "10.21.0-alpha.0",
43
+ "@sentry-internal/feedback": "10.21.0-alpha.0",
44
+ "@sentry-internal/replay": "10.21.0-alpha.0",
45
+ "@sentry-internal/replay-canvas": "10.21.0-alpha.0",
46
+ "@sentry/core": "10.21.0-alpha.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@sentry-internal/integration-shims": "10.20.0",
49
+ "@sentry-internal/integration-shims": "10.21.0-alpha.0",
50
50
  "fake-indexeddb": "^4.0.1"
51
51
  },
52
52
  "scripts": {