@groundcover/browser 0.1.0 → 1.0.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/CHANGELOG.md +57 -0
- package/README.md +371 -193
- package/assets/logo.png +0 -0
- package/dist/index.d.mts +56 -31
- package/dist/index.d.ts +56 -31
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +25 -5
package/assets/logo.png
ADDED
|
Binary file
|
package/dist/index.d.mts
CHANGED
|
@@ -232,27 +232,52 @@ interface PrivacyOptions {
|
|
|
232
232
|
maskInputFn?: (text: string, el: HTMLElement) => string;
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
|
+
/** Distributed-tracing header propagation for outgoing network requests. */
|
|
236
|
+
interface TracingOptions {
|
|
237
|
+
/** Request URLs (prefix match) that receive injected tracing headers. */
|
|
238
|
+
propagationUrls?: string[];
|
|
239
|
+
/** Inbound header names to read/propagate onto traced requests. */
|
|
240
|
+
propagationHeaders?: string[];
|
|
241
|
+
/** Header name carrying the trace id. */
|
|
242
|
+
traceIdHeaderName?: string;
|
|
243
|
+
/** Header name carrying the span id. */
|
|
244
|
+
spanIdHeaderName?: string;
|
|
245
|
+
/** Origin tag stamped on injected trace headers. */
|
|
246
|
+
origin?: {
|
|
247
|
+
name: string;
|
|
248
|
+
value: string;
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
/** Batching and delivery of outgoing event batches. */
|
|
252
|
+
interface TransportOptions {
|
|
253
|
+
/** Max events buffered before a batch is flushed (default 10). */
|
|
254
|
+
batchSize?: number;
|
|
255
|
+
/** Max ms a batch waits before flushing regardless of size (default 10000). */
|
|
256
|
+
batchTimeout?: number;
|
|
257
|
+
/** Gzip-compress outgoing batches; offloaded to the Web Worker when available (default true). */
|
|
258
|
+
compression?: boolean;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Session-replay (rrweb) recording controls. This is NOT a privacy surface —
|
|
262
|
+
* to mask sensitive content use `privacy`.
|
|
263
|
+
*/
|
|
264
|
+
interface ReplayOptions {
|
|
265
|
+
/**
|
|
266
|
+
* CSS selectors whose matching elements (and their subtrees) are excluded
|
|
267
|
+
* from session recording. Matching elements appear in the replay as empty
|
|
268
|
+
* placeholders of their original size. Useful for skipping noisy DOM injected
|
|
269
|
+
* by browser extensions (e.g. Grammarly).
|
|
270
|
+
*
|
|
271
|
+
* NOTE: this is a noise-reduction control, NOT a privacy control. To mask
|
|
272
|
+
* sensitive content use `privacy` instead.
|
|
273
|
+
*/
|
|
274
|
+
blockedSelectors?: string[];
|
|
275
|
+
}
|
|
235
276
|
interface SDKOptions {
|
|
236
|
-
batchSize: number;
|
|
237
|
-
batchTimeout: number;
|
|
238
277
|
enabledEvents: Array<"dom" | "network" | "exceptions" | "logs" | "pageload" | "navigation" | "performance" | "replay">;
|
|
239
278
|
eventSampleRate: number;
|
|
240
279
|
sessionSampleRate: number;
|
|
241
|
-
environment: string;
|
|
242
280
|
debug: boolean;
|
|
243
|
-
/** @deprecated Use `privacy.maskSelectors` / `privacy.sensitiveKeys`. Still honored. */
|
|
244
|
-
maskFields: string[];
|
|
245
|
-
/** @deprecated Use `privacy.level`. Still honored: `true` → `'mask-all'`, explicit `false` → `'allow'`. */
|
|
246
|
-
enableMasking: boolean;
|
|
247
|
-
tracePropagationUrls: string[];
|
|
248
|
-
tracePropagationHeaders: string[];
|
|
249
|
-
tracePropagationTraceIdHeaderName: string;
|
|
250
|
-
tracePropagationSpanIdHeaderName: string;
|
|
251
|
-
traceOrigin: {
|
|
252
|
-
name: string;
|
|
253
|
-
value: string;
|
|
254
|
-
};
|
|
255
|
-
enableCompression: boolean;
|
|
256
281
|
excludedUrls?: Array<string | RegExp>;
|
|
257
282
|
beforeSend?: (event: EventTypes[keyof EventTypes]) => boolean;
|
|
258
283
|
enrichEvent?: (event: EventTypes[keyof EventTypes]) => EventTypes[keyof EventTypes];
|
|
@@ -261,18 +286,15 @@ interface SDKOptions {
|
|
|
261
286
|
* ON by default (`level: 'mask-sensitive'`); see {@link PrivacyOptions}.
|
|
262
287
|
*/
|
|
263
288
|
privacy?: PrivacyOptions;
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
*/
|
|
274
|
-
blockedSelectors?: string[];
|
|
275
|
-
};
|
|
289
|
+
/** Distributed-tracing header propagation; see {@link TracingOptions}. */
|
|
290
|
+
tracing?: TracingOptions;
|
|
291
|
+
/** Batching & delivery of outgoing events; see {@link TransportOptions}. */
|
|
292
|
+
transport?: TransportOptions;
|
|
293
|
+
/**
|
|
294
|
+
* Session-replay recording controls (noise reduction). For replay MASKING use
|
|
295
|
+
* `privacy` instead. See {@link ReplayOptions}.
|
|
296
|
+
*/
|
|
297
|
+
replay?: ReplayOptions;
|
|
276
298
|
/**
|
|
277
299
|
* Target maximum wall-clock duration of a session, in milliseconds.
|
|
278
300
|
*
|
|
@@ -320,7 +342,7 @@ interface SDKConfigInput {
|
|
|
320
342
|
appId: string;
|
|
321
343
|
namespace?: string;
|
|
322
344
|
releaseId?: string;
|
|
323
|
-
|
|
345
|
+
user?: Partial<UserIdentifiers>;
|
|
324
346
|
options?: Partial<SDKOptions>;
|
|
325
347
|
sessionId?: string;
|
|
326
348
|
}
|
|
@@ -333,10 +355,13 @@ declare class SDKConfig {
|
|
|
333
355
|
namespace?: string;
|
|
334
356
|
releaseId?: string;
|
|
335
357
|
apiKey: string;
|
|
336
|
-
|
|
358
|
+
user: Partial<UserIdentifiers> | null;
|
|
337
359
|
options: Partial<SDKOptions>;
|
|
338
360
|
providedOptions?: Partial<SDKOptions>;
|
|
339
361
|
constructor(input?: SDKConfigInput);
|
|
362
|
+
private static readonly REMOVED_OPTION_KEYS;
|
|
363
|
+
private static stripRemovedOptions;
|
|
364
|
+
private static warnRemovedOptions;
|
|
340
365
|
private static normalizeSessionMaxDuration;
|
|
341
366
|
getEndpoint(): string;
|
|
342
367
|
updateConfig(updates: Partial<SDKConfig>): void;
|
|
@@ -389,7 +414,7 @@ declare function init(params?: {
|
|
|
389
414
|
namespace?: string;
|
|
390
415
|
appId?: string;
|
|
391
416
|
releaseId?: string;
|
|
392
|
-
|
|
417
|
+
user?: Partial<UserIdentifiers>;
|
|
393
418
|
dsn?: string;
|
|
394
419
|
options?: Partial<SDKOptions>;
|
|
395
420
|
apiKey?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -232,27 +232,52 @@ interface PrivacyOptions {
|
|
|
232
232
|
maskInputFn?: (text: string, el: HTMLElement) => string;
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
|
+
/** Distributed-tracing header propagation for outgoing network requests. */
|
|
236
|
+
interface TracingOptions {
|
|
237
|
+
/** Request URLs (prefix match) that receive injected tracing headers. */
|
|
238
|
+
propagationUrls?: string[];
|
|
239
|
+
/** Inbound header names to read/propagate onto traced requests. */
|
|
240
|
+
propagationHeaders?: string[];
|
|
241
|
+
/** Header name carrying the trace id. */
|
|
242
|
+
traceIdHeaderName?: string;
|
|
243
|
+
/** Header name carrying the span id. */
|
|
244
|
+
spanIdHeaderName?: string;
|
|
245
|
+
/** Origin tag stamped on injected trace headers. */
|
|
246
|
+
origin?: {
|
|
247
|
+
name: string;
|
|
248
|
+
value: string;
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
/** Batching and delivery of outgoing event batches. */
|
|
252
|
+
interface TransportOptions {
|
|
253
|
+
/** Max events buffered before a batch is flushed (default 10). */
|
|
254
|
+
batchSize?: number;
|
|
255
|
+
/** Max ms a batch waits before flushing regardless of size (default 10000). */
|
|
256
|
+
batchTimeout?: number;
|
|
257
|
+
/** Gzip-compress outgoing batches; offloaded to the Web Worker when available (default true). */
|
|
258
|
+
compression?: boolean;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Session-replay (rrweb) recording controls. This is NOT a privacy surface —
|
|
262
|
+
* to mask sensitive content use `privacy`.
|
|
263
|
+
*/
|
|
264
|
+
interface ReplayOptions {
|
|
265
|
+
/**
|
|
266
|
+
* CSS selectors whose matching elements (and their subtrees) are excluded
|
|
267
|
+
* from session recording. Matching elements appear in the replay as empty
|
|
268
|
+
* placeholders of their original size. Useful for skipping noisy DOM injected
|
|
269
|
+
* by browser extensions (e.g. Grammarly).
|
|
270
|
+
*
|
|
271
|
+
* NOTE: this is a noise-reduction control, NOT a privacy control. To mask
|
|
272
|
+
* sensitive content use `privacy` instead.
|
|
273
|
+
*/
|
|
274
|
+
blockedSelectors?: string[];
|
|
275
|
+
}
|
|
235
276
|
interface SDKOptions {
|
|
236
|
-
batchSize: number;
|
|
237
|
-
batchTimeout: number;
|
|
238
277
|
enabledEvents: Array<"dom" | "network" | "exceptions" | "logs" | "pageload" | "navigation" | "performance" | "replay">;
|
|
239
278
|
eventSampleRate: number;
|
|
240
279
|
sessionSampleRate: number;
|
|
241
|
-
environment: string;
|
|
242
280
|
debug: boolean;
|
|
243
|
-
/** @deprecated Use `privacy.maskSelectors` / `privacy.sensitiveKeys`. Still honored. */
|
|
244
|
-
maskFields: string[];
|
|
245
|
-
/** @deprecated Use `privacy.level`. Still honored: `true` → `'mask-all'`, explicit `false` → `'allow'`. */
|
|
246
|
-
enableMasking: boolean;
|
|
247
|
-
tracePropagationUrls: string[];
|
|
248
|
-
tracePropagationHeaders: string[];
|
|
249
|
-
tracePropagationTraceIdHeaderName: string;
|
|
250
|
-
tracePropagationSpanIdHeaderName: string;
|
|
251
|
-
traceOrigin: {
|
|
252
|
-
name: string;
|
|
253
|
-
value: string;
|
|
254
|
-
};
|
|
255
|
-
enableCompression: boolean;
|
|
256
281
|
excludedUrls?: Array<string | RegExp>;
|
|
257
282
|
beforeSend?: (event: EventTypes[keyof EventTypes]) => boolean;
|
|
258
283
|
enrichEvent?: (event: EventTypes[keyof EventTypes]) => EventTypes[keyof EventTypes];
|
|
@@ -261,18 +286,15 @@ interface SDKOptions {
|
|
|
261
286
|
* ON by default (`level: 'mask-sensitive'`); see {@link PrivacyOptions}.
|
|
262
287
|
*/
|
|
263
288
|
privacy?: PrivacyOptions;
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
*/
|
|
274
|
-
blockedSelectors?: string[];
|
|
275
|
-
};
|
|
289
|
+
/** Distributed-tracing header propagation; see {@link TracingOptions}. */
|
|
290
|
+
tracing?: TracingOptions;
|
|
291
|
+
/** Batching & delivery of outgoing events; see {@link TransportOptions}. */
|
|
292
|
+
transport?: TransportOptions;
|
|
293
|
+
/**
|
|
294
|
+
* Session-replay recording controls (noise reduction). For replay MASKING use
|
|
295
|
+
* `privacy` instead. See {@link ReplayOptions}.
|
|
296
|
+
*/
|
|
297
|
+
replay?: ReplayOptions;
|
|
276
298
|
/**
|
|
277
299
|
* Target maximum wall-clock duration of a session, in milliseconds.
|
|
278
300
|
*
|
|
@@ -320,7 +342,7 @@ interface SDKConfigInput {
|
|
|
320
342
|
appId: string;
|
|
321
343
|
namespace?: string;
|
|
322
344
|
releaseId?: string;
|
|
323
|
-
|
|
345
|
+
user?: Partial<UserIdentifiers>;
|
|
324
346
|
options?: Partial<SDKOptions>;
|
|
325
347
|
sessionId?: string;
|
|
326
348
|
}
|
|
@@ -333,10 +355,13 @@ declare class SDKConfig {
|
|
|
333
355
|
namespace?: string;
|
|
334
356
|
releaseId?: string;
|
|
335
357
|
apiKey: string;
|
|
336
|
-
|
|
358
|
+
user: Partial<UserIdentifiers> | null;
|
|
337
359
|
options: Partial<SDKOptions>;
|
|
338
360
|
providedOptions?: Partial<SDKOptions>;
|
|
339
361
|
constructor(input?: SDKConfigInput);
|
|
362
|
+
private static readonly REMOVED_OPTION_KEYS;
|
|
363
|
+
private static stripRemovedOptions;
|
|
364
|
+
private static warnRemovedOptions;
|
|
340
365
|
private static normalizeSessionMaxDuration;
|
|
341
366
|
getEndpoint(): string;
|
|
342
367
|
updateConfig(updates: Partial<SDKConfig>): void;
|
|
@@ -389,7 +414,7 @@ declare function init(params?: {
|
|
|
389
414
|
namespace?: string;
|
|
390
415
|
appId?: string;
|
|
391
416
|
releaseId?: string;
|
|
392
|
-
|
|
417
|
+
user?: Partial<UserIdentifiers>;
|
|
393
418
|
dsn?: string;
|
|
394
419
|
options?: Partial<SDKOptions>;
|
|
395
420
|
apiKey?: string;
|