@sentry/browser 10.19.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.
- package/build/npm/cjs/client.js +1 -35
- package/build/npm/cjs/client.js.map +1 -1
- package/build/npm/cjs/index.js +9 -2
- package/build/npm/cjs/index.js.map +1 -1
- package/build/npm/cjs/integrations/featureFlags/growthbook/integration.js +29 -0
- package/build/npm/cjs/integrations/featureFlags/growthbook/integration.js.map +1 -0
- package/build/npm/cjs/integrations/httpcontext.js +2 -0
- package/build/npm/cjs/integrations/httpcontext.js.map +1 -1
- package/build/npm/cjs/integrations/spanstreaming.js +252 -0
- package/build/npm/cjs/integrations/spanstreaming.js.map +1 -0
- package/build/npm/cjs/tracing/browserTracingIntegration.js +2 -0
- package/build/npm/cjs/tracing/browserTracingIntegration.js.map +1 -1
- package/build/npm/cjs/tracing/request.js +18 -36
- package/build/npm/cjs/tracing/request.js.map +1 -1
- package/build/npm/cjs/tracing/utils.js +54 -0
- package/build/npm/cjs/tracing/utils.js.map +1 -0
- package/build/npm/cjs/utils/lazyLoadIntegration.js +3 -0
- package/build/npm/cjs/utils/lazyLoadIntegration.js.map +1 -1
- package/build/npm/esm/client.js +1 -35
- package/build/npm/esm/client.js.map +1 -1
- package/build/npm/esm/index.js +3 -1
- package/build/npm/esm/index.js.map +1 -1
- package/build/npm/esm/integrations/featureFlags/growthbook/integration.js +27 -0
- package/build/npm/esm/integrations/featureFlags/growthbook/integration.js.map +1 -0
- package/build/npm/esm/integrations/httpcontext.js +2 -0
- package/build/npm/esm/integrations/httpcontext.js.map +1 -1
- package/build/npm/esm/integrations/spanstreaming.js +250 -0
- package/build/npm/esm/integrations/spanstreaming.js.map +1 -0
- package/build/npm/esm/package.json +1 -1
- package/build/npm/esm/tracing/browserTracingIntegration.js +2 -0
- package/build/npm/esm/tracing/browserTracingIntegration.js.map +1 -1
- package/build/npm/esm/tracing/request.js +15 -33
- package/build/npm/esm/tracing/request.js.map +1 -1
- package/build/npm/esm/tracing/utils.js +49 -0
- package/build/npm/esm/tracing/utils.js.map +1 -0
- package/build/npm/esm/utils/lazyLoadIntegration.js +3 -0
- package/build/npm/esm/utils/lazyLoadIntegration.js.map +1 -1
- package/build/npm/types/client.d.ts +0 -2
- package/build/npm/types/client.d.ts.map +1 -1
- package/build/npm/types/helpers.d.ts +1 -0
- package/build/npm/types/helpers.d.ts.map +1 -1
- package/build/npm/types/index.d.ts +3 -1
- package/build/npm/types/index.d.ts.map +1 -1
- package/build/npm/types/integrations/featureFlags/growthbook/index.d.ts +2 -0
- package/build/npm/types/integrations/featureFlags/growthbook/index.d.ts.map +1 -0
- package/build/npm/types/integrations/featureFlags/growthbook/integration.d.ts +25 -0
- package/build/npm/types/integrations/featureFlags/growthbook/integration.d.ts.map +1 -0
- package/build/npm/types/integrations/featureFlags/growthbook/types.d.ts +6 -0
- package/build/npm/types/integrations/featureFlags/growthbook/types.d.ts.map +1 -0
- package/build/npm/types/integrations/httpcontext.d.ts.map +1 -1
- package/build/npm/types/integrations/spanstreaming.d.ts +5 -0
- package/build/npm/types/integrations/spanstreaming.d.ts.map +1 -0
- package/build/npm/types/integrations-bundle/index.instrumentanthropicaiclient.d.ts +2 -0
- package/build/npm/types/integrations-bundle/index.instrumentanthropicaiclient.d.ts.map +1 -0
- package/build/npm/types/integrations-bundle/index.instrumentgooglegenaiclient.d.ts +2 -0
- package/build/npm/types/integrations-bundle/index.instrumentgooglegenaiclient.d.ts.map +1 -0
- package/build/npm/types/integrations-bundle/index.instrumentopenaiclient.d.ts +2 -0
- package/build/npm/types/integrations-bundle/index.instrumentopenaiclient.d.ts.map +1 -0
- package/build/npm/types/tracing/browserTracingIntegration.d.ts +6 -4
- package/build/npm/types/tracing/browserTracingIntegration.d.ts.map +1 -1
- package/build/npm/types/tracing/request.d.ts +6 -4
- package/build/npm/types/tracing/request.d.ts.map +1 -1
- package/build/npm/types/tracing/utils.d.ts +17 -0
- package/build/npm/types/tracing/utils.d.ts.map +1 -0
- package/build/npm/types/utils/lazyLoadIntegration.d.ts +3 -0
- package/build/npm/types/utils/lazyLoadIntegration.d.ts.map +1 -1
- package/build/npm/types-ts3.8/client.d.ts +0 -2
- package/build/npm/types-ts3.8/helpers.d.ts +1 -0
- package/build/npm/types-ts3.8/index.d.ts +3 -1
- package/build/npm/types-ts3.8/integrations/featureFlags/growthbook/index.d.ts +2 -0
- package/build/npm/types-ts3.8/integrations/featureFlags/growthbook/integration.d.ts +25 -0
- package/build/npm/types-ts3.8/integrations/featureFlags/growthbook/types.d.ts +6 -0
- package/build/npm/types-ts3.8/integrations/spanstreaming.d.ts +5 -0
- package/build/npm/types-ts3.8/integrations-bundle/index.instrumentanthropicaiclient.d.ts +2 -0
- package/build/npm/types-ts3.8/integrations-bundle/index.instrumentgooglegenaiclient.d.ts +2 -0
- package/build/npm/types-ts3.8/integrations-bundle/index.instrumentopenaiclient.d.ts +2 -0
- package/build/npm/types-ts3.8/tracing/browserTracingIntegration.d.ts +6 -4
- package/build/npm/types-ts3.8/tracing/request.d.ts +6 -4
- package/build/npm/types-ts3.8/tracing/utils.d.ts +17 -0
- package/build/npm/types-ts3.8/utils/lazyLoadIntegration.d.ts +3 -0
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,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,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE,OAAO,EACL,yB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AACrH,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAC7G,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/growthbook/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { GrowthBookClass } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Sentry integration for capturing feature flag evaluations from GrowthBook.
|
|
4
|
+
*
|
|
5
|
+
* See the feature flag documentation: https://develop.sentry.dev/sdk/expected-features/#feature-flags
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```
|
|
9
|
+
* import { GrowthBook } from '@growthbook/growthbook';
|
|
10
|
+
* import * as Sentry from '@sentry/browser';
|
|
11
|
+
*
|
|
12
|
+
* Sentry.init({
|
|
13
|
+
* dsn: '___PUBLIC_DSN___',
|
|
14
|
+
* integrations: [Sentry.growthbookIntegration({ growthbookClass: GrowthBook })],
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* const gb = new GrowthBook();
|
|
18
|
+
* gb.isOn('my-feature');
|
|
19
|
+
* Sentry.captureException(new Error('something went wrong'));
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const growthbookIntegration: ({ growthbookClass }: {
|
|
23
|
+
growthbookClass: GrowthBookClass;
|
|
24
|
+
}) => import("@sentry/core").Integration;
|
|
25
|
+
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/growthbook/integration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,qBAAqB;qBAA6C,eAAe;wCACrB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface GrowthBook {
|
|
2
|
+
isOn(this: GrowthBook, featureKey: string, ...rest: unknown[]): boolean;
|
|
3
|
+
getFeatureValue(this: GrowthBook, featureKey: string, defaultValue: unknown, ...rest: unknown[]): unknown;
|
|
4
|
+
}
|
|
5
|
+
export type GrowthBookClass = new (...args: unknown[]) => GrowthBook;
|
|
6
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/growthbook/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IACxE,eAAe,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;CAC3G;AAGD,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpcontext.d.ts","sourceRoot":"","sources":["../../../../src/integrations/httpcontext.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"httpcontext.d.ts","sourceRoot":"","sources":["../../../../src/integrations/httpcontext.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,0CAwBjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spanstreaming.d.ts","sourceRoot":"","sources":["../../../../src/integrations/spanstreaming.ts"],"names":[],"mappings":"AAgCA,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,wBAAwB,iGA+DV,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.instrumentanthropicaiclient.d.ts","sourceRoot":"","sources":["../../../../src/integrations-bundle/index.instrumentanthropicaiclient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.instrumentgooglegenaiclient.d.ts","sourceRoot":"","sources":["../../../../src/integrations-bundle/index.instrumentgooglegenaiclient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.instrumentopenaiclient.d.ts","sourceRoot":"","sources":["../../../../src/integrations-bundle/index.instrumentopenaiclient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Client, Span, StartSpanOptions
|
|
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
|
-
|
|
228
|
-
|
|
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,
|
|
1
|
+
{"version":3,"file":"browserTracingIntegration.d.ts","sourceRoot":"","sources":["../../../../src/tracing/browserTracingIntegration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EAEN,eAAe,EACf,gBAAgB,EAChB,IAAI,EACJ,gBAAgB,EAEjB,MAAM,cAAc,CAAC;AA6CtB,eAAO,MAAM,8BAA8B,mBAAmB,CAAC;AAO/D,8CAA8C;AAC9C,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;OAIG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;;;OAIG;IACH,oBAAoB,EAAE,OAAO,CAAC;IAE9B;;;;;;OAMG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;;;OAIG;IACH,cAAc,EAAE,OAAO,CA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AAI,EAAE,kBAAkB,EAAE,eAAe,GAAG,IAAI,CAAC;IAE3E;;OAEG;IACH,gBAAgB,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,mBAAmB,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC5E;AAqBD;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,aAAc,QAAQ,qBAAqB,CAAC;;;;CAiXxD,CAAC;AAE3B;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,gBAAgB,EAC7B,YAAY,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAChF,IAAI,GAAG,SAAS,CAWlB;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,gBAAgB,EAC7B,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;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,
|
|
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
|
-
|
|
72
|
-
|
|
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,
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/tracing/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAEN,eAAe,EACf,gBAAgB,EAEhB,IAAI,EACL,MAAM,cAAc,CAAC;AA+BtB,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,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAE9D;;OAEG;IACH,kBAAkB,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,kBAAkB,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"}
|
|
@@ -16,6 +16,9 @@ declare const LazyLoadableIntegrations: {
|
|
|
16
16
|
readonly rewriteFramesIntegration: "rewriteframes";
|
|
17
17
|
readonly browserProfilingIntegration: "browserprofiling";
|
|
18
18
|
readonly moduleMetadataIntegration: "modulemetadata";
|
|
19
|
+
readonly instrumentAnthropicAiClient: "instrumentanthropicaiclient";
|
|
20
|
+
readonly instrumentOpenAiClient: "instrumentopenaiclient";
|
|
21
|
+
readonly instrumentGoogleGenAIClient: "instrumentgooglegenaiclient";
|
|
19
22
|
};
|
|
20
23
|
/**
|
|
21
24
|
* Lazy load an integration from the CDN.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazyLoadIntegration.d.ts","sourceRoot":"","sources":["../../../../src/utils/lazyLoadIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAMlD,QAAA,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"lazyLoadIntegration.d.ts","sourceRoot":"","sources":["../../../../src/utils/lazyLoadIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAMlD,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;CAoBpB,CAAC;AAMX;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,OAAO,wBAAwB,EAC3C,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,aAAa,CAAC,CAwDxB"}
|
|
@@ -53,8 +53,6 @@ export type BrowserClientOptions = ClientOptions<BrowserTransportOptions> & Brow
|
|
|
53
53
|
* @see SentryClient for usage documentation.
|
|
54
54
|
*/
|
|
55
55
|
export declare class BrowserClient extends Client<BrowserClientOptions> {
|
|
56
|
-
private _logFlushIdleTimeout;
|
|
57
|
-
private _metricFlushIdleTimeout;
|
|
58
56
|
/**
|
|
59
57
|
* Creates a new Browser SDK instance.
|
|
60
58
|
*
|
|
@@ -22,6 +22,7 @@ export declare const WINDOW: {
|
|
|
22
22
|
} | undefined;
|
|
23
23
|
SENTRY_SDK_SOURCE?: import("@sentry/core").SdkSource | undefined;
|
|
24
24
|
_sentryDebugIds?: Record<string, string> | undefined;
|
|
25
|
+
_debugIds?: Record<string, string> | undefined;
|
|
25
26
|
_sentryModuleMetadata?: Record<string, any> | undefined;
|
|
26
27
|
_sentryEsmLoaderHookRegistered?: boolean | undefined;
|
|
27
28
|
_sentryInjectLoaderHookRegister?: (() => void) | undefined;
|
|
@@ -16,7 +16,7 @@ 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, moduleMetadataIntegration, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, thirdPartyErrorFilterIntegration, featureFlagsIntegration, logger, } from '@sentry/core';
|
|
19
|
+
export { registerSpanErrorInstrumentation, getActiveSpan, getRootSpan, startSpan, startInactiveSpan, startSpanManual, withActiveSpan, startNewTrace, getSpanDescendants, setMeasurement, getSpanStatusFromHttpCode, setHttpStatus, makeMultiplexedTransport, moduleMetadataIntegration, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, thirdPartyErrorFilterIntegration, featureFlagsIntegration, instrumentAnthropicAiClient, instrumentOpenAiClient, instrumentGoogleGenAIClient, 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';
|
|
@@ -25,7 +25,9 @@ export { browserSessionIntegration } from './integrations/browsersession';
|
|
|
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';
|
|
28
|
+
export { growthbookIntegration } from './integrations/featureFlags/growthbook';
|
|
28
29
|
export { statsigIntegration } from './integrations/featureFlags/statsig';
|
|
29
30
|
export { diagnoseSdkConnectivity } from './diagnose-sdk';
|
|
30
31
|
export { webWorkerIntegration, registerWebWorker } from './integrations/webWorker';
|
|
32
|
+
export { spanStreamingIntegration } from './integrations/spanstreaming';
|
|
31
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { GrowthBookClass } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Sentry integration for capturing feature flag evaluations from GrowthBook.
|
|
4
|
+
*
|
|
5
|
+
* See the feature flag documentation: https://develop.sentry.dev/sdk/expected-features/#feature-flags
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```
|
|
9
|
+
* import { GrowthBook } from '@growthbook/growthbook';
|
|
10
|
+
* import * as Sentry from '@sentry/browser';
|
|
11
|
+
*
|
|
12
|
+
* Sentry.init({
|
|
13
|
+
* dsn: '___PUBLIC_DSN___',
|
|
14
|
+
* integrations: [Sentry.growthbookIntegration({ growthbookClass: GrowthBook })],
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* const gb = new GrowthBook();
|
|
18
|
+
* gb.isOn('my-feature');
|
|
19
|
+
* Sentry.captureException(new Error('something went wrong'));
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const growthbookIntegration: ({ growthbookClass }: {
|
|
23
|
+
growthbookClass: GrowthBookClass;
|
|
24
|
+
}) => import("@sentry/core").Integration;
|
|
25
|
+
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface GrowthBook {
|
|
2
|
+
isOn(this: GrowthBook, featureKey: string, ...rest: unknown[]): boolean;
|
|
3
|
+
getFeatureValue(this: GrowthBook, featureKey: string, defaultValue: unknown, ...rest: unknown[]): unknown;
|
|
4
|
+
}
|
|
5
|
+
export type GrowthBookClass = new (...args: unknown[]) => GrowthBook;
|
|
6
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Client, Span, StartSpanOptions
|
|
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
|
-
|
|
228
|
-
|
|
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,
|
|
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
|
-
|
|
72
|
-
|
|
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
|
|
@@ -16,6 +16,9 @@ declare const LazyLoadableIntegrations: {
|
|
|
16
16
|
readonly rewriteFramesIntegration: "rewriteframes";
|
|
17
17
|
readonly browserProfilingIntegration: "browserprofiling";
|
|
18
18
|
readonly moduleMetadataIntegration: "modulemetadata";
|
|
19
|
+
readonly instrumentAnthropicAiClient: "instrumentanthropicaiclient";
|
|
20
|
+
readonly instrumentOpenAiClient: "instrumentopenaiclient";
|
|
21
|
+
readonly instrumentGoogleGenAIClient: "instrumentgooglegenaiclient";
|
|
19
22
|
};
|
|
20
23
|
/**
|
|
21
24
|
* Lazy load an integration from the CDN.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/browser",
|
|
3
|
-
"version": "10.
|
|
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.
|
|
43
|
-
"@sentry-internal/feedback": "10.
|
|
44
|
-
"@sentry-internal/replay": "10.
|
|
45
|
-
"@sentry-internal/replay-canvas": "10.
|
|
46
|
-
"@sentry/core": "10.
|
|
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.
|
|
49
|
+
"@sentry-internal/integration-shims": "10.21.0-alpha.0",
|
|
50
50
|
"fake-indexeddb": "^4.0.1"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|