@genesislcap/foundation-utils 15.54.0 → 15.56.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/dist/custom-elements.json +198 -198
- package/dist/dts/error-monitoring/error-monitoring.d.ts +77 -9
- package/dist/dts/error-monitoring/error-monitoring.d.ts.map +1 -1
- package/dist/esm/error-monitoring/error-monitoring.js +105 -11
- package/dist/foundation-utils.api.json +760 -14
- package/dist/foundation-utils.d.ts +80 -9
- package/package.json +9 -9
|
@@ -258,6 +258,204 @@
|
|
|
258
258
|
}
|
|
259
259
|
]
|
|
260
260
|
},
|
|
261
|
+
{
|
|
262
|
+
"kind": "javascript-module",
|
|
263
|
+
"path": "src/data/inMemoryDatabase.ts",
|
|
264
|
+
"declarations": [
|
|
265
|
+
{
|
|
266
|
+
"kind": "class",
|
|
267
|
+
"description": "An in memory database of specific DatabaseRecord types.",
|
|
268
|
+
"name": "InMemoryDatabase",
|
|
269
|
+
"members": [
|
|
270
|
+
{
|
|
271
|
+
"kind": "field",
|
|
272
|
+
"name": "isWorking",
|
|
273
|
+
"type": {
|
|
274
|
+
"text": "boolean"
|
|
275
|
+
},
|
|
276
|
+
"privacy": "public",
|
|
277
|
+
"default": "false"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"kind": "field",
|
|
281
|
+
"name": "records",
|
|
282
|
+
"type": {
|
|
283
|
+
"text": "Record<string, T>"
|
|
284
|
+
},
|
|
285
|
+
"privacy": "private",
|
|
286
|
+
"default": "{}"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"kind": "field",
|
|
290
|
+
"name": "beforeUpdateListeners",
|
|
291
|
+
"privacy": "private"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"kind": "field",
|
|
295
|
+
"name": "afterUpdateListeners",
|
|
296
|
+
"privacy": "private"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"kind": "method",
|
|
300
|
+
"name": "create",
|
|
301
|
+
"privacy": "public",
|
|
302
|
+
"return": {
|
|
303
|
+
"type": {
|
|
304
|
+
"text": "Promise<DatabaseAccessResult.Create<T>>"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"parameters": [
|
|
308
|
+
{
|
|
309
|
+
"name": "newValue",
|
|
310
|
+
"type": {
|
|
311
|
+
"text": "Omit<T, 'id'>"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
]
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"kind": "method",
|
|
318
|
+
"name": "read",
|
|
319
|
+
"privacy": "public",
|
|
320
|
+
"return": {
|
|
321
|
+
"type": {
|
|
322
|
+
"text": "Promise<DatabaseAccessResult.Read<T>>"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"parameters": [
|
|
326
|
+
{
|
|
327
|
+
"name": "id",
|
|
328
|
+
"type": {
|
|
329
|
+
"text": "string"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"kind": "method",
|
|
336
|
+
"name": "update",
|
|
337
|
+
"privacy": "public",
|
|
338
|
+
"return": {
|
|
339
|
+
"type": {
|
|
340
|
+
"text": "Promise<DatabaseAccessResult.Update<T>>"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"parameters": [
|
|
344
|
+
{
|
|
345
|
+
"name": "id",
|
|
346
|
+
"type": {
|
|
347
|
+
"text": "string"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"name": "newValue",
|
|
352
|
+
"type": {
|
|
353
|
+
"text": "Omit<Partial<T>, 'id'>"
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
]
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"kind": "method",
|
|
360
|
+
"name": "delete",
|
|
361
|
+
"privacy": "public",
|
|
362
|
+
"return": {
|
|
363
|
+
"type": {
|
|
364
|
+
"text": "Promise<DatabaseAccessResult.Delete>"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"parameters": [
|
|
368
|
+
{
|
|
369
|
+
"name": "id",
|
|
370
|
+
"type": {
|
|
371
|
+
"text": "string"
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
]
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"kind": "method",
|
|
378
|
+
"name": "visit",
|
|
379
|
+
"privacy": "public",
|
|
380
|
+
"return": {
|
|
381
|
+
"type": {
|
|
382
|
+
"text": "Promise<void>"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"parameters": [
|
|
386
|
+
{
|
|
387
|
+
"name": "visitor",
|
|
388
|
+
"type": {
|
|
389
|
+
"text": "(record: T) => void"
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
]
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"kind": "method",
|
|
396
|
+
"name": "onBeforeUpdate",
|
|
397
|
+
"privacy": "public",
|
|
398
|
+
"return": {
|
|
399
|
+
"type": {
|
|
400
|
+
"text": "() => void"
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
"parameters": [
|
|
404
|
+
{
|
|
405
|
+
"name": "listener",
|
|
406
|
+
"type": {
|
|
407
|
+
"text": "Listener<DatabaseEvent.BeforeUpdate<T>>"
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
]
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"kind": "method",
|
|
414
|
+
"name": "onAfterUpdate",
|
|
415
|
+
"privacy": "public",
|
|
416
|
+
"return": {
|
|
417
|
+
"type": {
|
|
418
|
+
"text": "() => void"
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"parameters": [
|
|
422
|
+
{
|
|
423
|
+
"name": "listener",
|
|
424
|
+
"type": {
|
|
425
|
+
"text": "Listener<DatabaseEvent.AfterUpdate<T>>"
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
]
|
|
429
|
+
}
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
],
|
|
433
|
+
"exports": [
|
|
434
|
+
{
|
|
435
|
+
"kind": "js",
|
|
436
|
+
"name": "InMemoryDatabase",
|
|
437
|
+
"declaration": {
|
|
438
|
+
"name": "InMemoryDatabase",
|
|
439
|
+
"module": "src/data/inMemoryDatabase.ts"
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
]
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"kind": "javascript-module",
|
|
446
|
+
"path": "src/data/index.ts",
|
|
447
|
+
"declarations": [],
|
|
448
|
+
"exports": [
|
|
449
|
+
{
|
|
450
|
+
"kind": "js",
|
|
451
|
+
"name": "*",
|
|
452
|
+
"declaration": {
|
|
453
|
+
"name": "*",
|
|
454
|
+
"package": "./inMemoryDatabase"
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
]
|
|
458
|
+
},
|
|
261
459
|
{
|
|
262
460
|
"kind": "javascript-module",
|
|
263
461
|
"path": "src/design-system/design-system.ts",
|
|
@@ -460,204 +658,6 @@
|
|
|
460
658
|
}
|
|
461
659
|
]
|
|
462
660
|
},
|
|
463
|
-
{
|
|
464
|
-
"kind": "javascript-module",
|
|
465
|
-
"path": "src/data/inMemoryDatabase.ts",
|
|
466
|
-
"declarations": [
|
|
467
|
-
{
|
|
468
|
-
"kind": "class",
|
|
469
|
-
"description": "An in memory database of specific DatabaseRecord types.",
|
|
470
|
-
"name": "InMemoryDatabase",
|
|
471
|
-
"members": [
|
|
472
|
-
{
|
|
473
|
-
"kind": "field",
|
|
474
|
-
"name": "isWorking",
|
|
475
|
-
"type": {
|
|
476
|
-
"text": "boolean"
|
|
477
|
-
},
|
|
478
|
-
"privacy": "public",
|
|
479
|
-
"default": "false"
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
"kind": "field",
|
|
483
|
-
"name": "records",
|
|
484
|
-
"type": {
|
|
485
|
-
"text": "Record<string, T>"
|
|
486
|
-
},
|
|
487
|
-
"privacy": "private",
|
|
488
|
-
"default": "{}"
|
|
489
|
-
},
|
|
490
|
-
{
|
|
491
|
-
"kind": "field",
|
|
492
|
-
"name": "beforeUpdateListeners",
|
|
493
|
-
"privacy": "private"
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
"kind": "field",
|
|
497
|
-
"name": "afterUpdateListeners",
|
|
498
|
-
"privacy": "private"
|
|
499
|
-
},
|
|
500
|
-
{
|
|
501
|
-
"kind": "method",
|
|
502
|
-
"name": "create",
|
|
503
|
-
"privacy": "public",
|
|
504
|
-
"return": {
|
|
505
|
-
"type": {
|
|
506
|
-
"text": "Promise<DatabaseAccessResult.Create<T>>"
|
|
507
|
-
}
|
|
508
|
-
},
|
|
509
|
-
"parameters": [
|
|
510
|
-
{
|
|
511
|
-
"name": "newValue",
|
|
512
|
-
"type": {
|
|
513
|
-
"text": "Omit<T, 'id'>"
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
]
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
"kind": "method",
|
|
520
|
-
"name": "read",
|
|
521
|
-
"privacy": "public",
|
|
522
|
-
"return": {
|
|
523
|
-
"type": {
|
|
524
|
-
"text": "Promise<DatabaseAccessResult.Read<T>>"
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
"parameters": [
|
|
528
|
-
{
|
|
529
|
-
"name": "id",
|
|
530
|
-
"type": {
|
|
531
|
-
"text": "string"
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
]
|
|
535
|
-
},
|
|
536
|
-
{
|
|
537
|
-
"kind": "method",
|
|
538
|
-
"name": "update",
|
|
539
|
-
"privacy": "public",
|
|
540
|
-
"return": {
|
|
541
|
-
"type": {
|
|
542
|
-
"text": "Promise<DatabaseAccessResult.Update<T>>"
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
"parameters": [
|
|
546
|
-
{
|
|
547
|
-
"name": "id",
|
|
548
|
-
"type": {
|
|
549
|
-
"text": "string"
|
|
550
|
-
}
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
"name": "newValue",
|
|
554
|
-
"type": {
|
|
555
|
-
"text": "Omit<Partial<T>, 'id'>"
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
]
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
"kind": "method",
|
|
562
|
-
"name": "delete",
|
|
563
|
-
"privacy": "public",
|
|
564
|
-
"return": {
|
|
565
|
-
"type": {
|
|
566
|
-
"text": "Promise<DatabaseAccessResult.Delete>"
|
|
567
|
-
}
|
|
568
|
-
},
|
|
569
|
-
"parameters": [
|
|
570
|
-
{
|
|
571
|
-
"name": "id",
|
|
572
|
-
"type": {
|
|
573
|
-
"text": "string"
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
]
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
"kind": "method",
|
|
580
|
-
"name": "visit",
|
|
581
|
-
"privacy": "public",
|
|
582
|
-
"return": {
|
|
583
|
-
"type": {
|
|
584
|
-
"text": "Promise<void>"
|
|
585
|
-
}
|
|
586
|
-
},
|
|
587
|
-
"parameters": [
|
|
588
|
-
{
|
|
589
|
-
"name": "visitor",
|
|
590
|
-
"type": {
|
|
591
|
-
"text": "(record: T) => void"
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
]
|
|
595
|
-
},
|
|
596
|
-
{
|
|
597
|
-
"kind": "method",
|
|
598
|
-
"name": "onBeforeUpdate",
|
|
599
|
-
"privacy": "public",
|
|
600
|
-
"return": {
|
|
601
|
-
"type": {
|
|
602
|
-
"text": "() => void"
|
|
603
|
-
}
|
|
604
|
-
},
|
|
605
|
-
"parameters": [
|
|
606
|
-
{
|
|
607
|
-
"name": "listener",
|
|
608
|
-
"type": {
|
|
609
|
-
"text": "Listener<DatabaseEvent.BeforeUpdate<T>>"
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
]
|
|
613
|
-
},
|
|
614
|
-
{
|
|
615
|
-
"kind": "method",
|
|
616
|
-
"name": "onAfterUpdate",
|
|
617
|
-
"privacy": "public",
|
|
618
|
-
"return": {
|
|
619
|
-
"type": {
|
|
620
|
-
"text": "() => void"
|
|
621
|
-
}
|
|
622
|
-
},
|
|
623
|
-
"parameters": [
|
|
624
|
-
{
|
|
625
|
-
"name": "listener",
|
|
626
|
-
"type": {
|
|
627
|
-
"text": "Listener<DatabaseEvent.AfterUpdate<T>>"
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
]
|
|
631
|
-
}
|
|
632
|
-
]
|
|
633
|
-
}
|
|
634
|
-
],
|
|
635
|
-
"exports": [
|
|
636
|
-
{
|
|
637
|
-
"kind": "js",
|
|
638
|
-
"name": "InMemoryDatabase",
|
|
639
|
-
"declaration": {
|
|
640
|
-
"name": "InMemoryDatabase",
|
|
641
|
-
"module": "src/data/inMemoryDatabase.ts"
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
]
|
|
645
|
-
},
|
|
646
|
-
{
|
|
647
|
-
"kind": "javascript-module",
|
|
648
|
-
"path": "src/data/index.ts",
|
|
649
|
-
"declarations": [],
|
|
650
|
-
"exports": [
|
|
651
|
-
{
|
|
652
|
-
"kind": "js",
|
|
653
|
-
"name": "*",
|
|
654
|
-
"declaration": {
|
|
655
|
-
"name": "*",
|
|
656
|
-
"package": "./inMemoryDatabase"
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
]
|
|
660
|
-
},
|
|
661
661
|
{
|
|
662
662
|
"kind": "javascript-module",
|
|
663
663
|
"path": "src/decorators/index.ts",
|
|
@@ -28,6 +28,34 @@ export interface ErrorMonitoringBreadcrumb {
|
|
|
28
28
|
* @public
|
|
29
29
|
*/
|
|
30
30
|
export type ErrorMonitoringBreadcrumbHint = Record<string, unknown>;
|
|
31
|
+
/**
|
|
32
|
+
* An event about to be sent, with the page it happened on.
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export interface ErrorMonitoringEvent {
|
|
36
|
+
request?: {
|
|
37
|
+
url?: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A tracing span about to be sent: its `attributes` when spans are streamed, or its `data` inside a
|
|
42
|
+
* transaction.
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export interface ErrorMonitoringSpan {
|
|
46
|
+
name?: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
op?: string;
|
|
49
|
+
attributes?: Record<string, unknown>;
|
|
50
|
+
data?: Record<string, unknown>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* An SDK integration, such as one of Sentry's default integrations.
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
export interface ErrorMonitoringIntegration {
|
|
57
|
+
name: string;
|
|
58
|
+
}
|
|
31
59
|
/**
|
|
32
60
|
* Options {@link setupErrorMonitoring} passes to the client's `init`.
|
|
33
61
|
*
|
|
@@ -38,8 +66,22 @@ export type ErrorMonitoringBreadcrumbHint = Record<string, unknown>;
|
|
|
38
66
|
export interface ErrorMonitoringInitOptions {
|
|
39
67
|
dsn: string;
|
|
40
68
|
environment: string;
|
|
41
|
-
/**
|
|
69
|
+
/** Turns off Sentry 11's user info, cookies, headers but `User-Agent`, bodies and URL queries. */
|
|
70
|
+
dataCollection: Record<string, unknown>;
|
|
71
|
+
/** Keeps only the SDK's default integrations that send nothing from the page, plus the app's. */
|
|
72
|
+
integrations: <I extends ErrorMonitoringIntegration>(defaults: I[]) => I[];
|
|
73
|
+
/** Drops console, click and input breadcrumbs, and strips queries and fragments from URLs. */
|
|
42
74
|
beforeBreadcrumb?: <B extends ErrorMonitoringBreadcrumb>(breadcrumb: B, hint?: ErrorMonitoringBreadcrumbHint) => B | null;
|
|
75
|
+
/** Strips the query string and fragment from the page URL. */
|
|
76
|
+
beforeSend: <E extends ErrorMonitoringEvent>(event: E, hint?: unknown) => E | null | PromiseLike<E | null>;
|
|
77
|
+
/**
|
|
78
|
+
* Strips the query string and fragment from the page URL on transactions. Set only with
|
|
79
|
+
* `traceLifecycle: 'static'`: streamed spans, Sentry 11's default, send no transactions, and
|
|
80
|
+
* Sentry warns on every page load when the option is set without them.
|
|
81
|
+
*/
|
|
82
|
+
beforeSendTransaction?: <E extends ErrorMonitoringEvent>(event: E, hint?: unknown) => E | null | PromiseLike<E | null>;
|
|
83
|
+
/** Strips queries and fragments from span URLs and resource span names, when tracing is on. */
|
|
84
|
+
beforeSendSpan: <S extends ErrorMonitoringSpan>(span: S) => S;
|
|
43
85
|
[key: string]: unknown;
|
|
44
86
|
}
|
|
45
87
|
/**
|
|
@@ -47,8 +89,24 @@ export interface ErrorMonitoringInitOptions {
|
|
|
47
89
|
* @public
|
|
48
90
|
*/
|
|
49
91
|
export interface ErrorMonitoringExtraInitOptions {
|
|
92
|
+
/**
|
|
93
|
+
* Merged over the defaults, which turn off user info, cookies, headers other than `User-Agent`,
|
|
94
|
+
* bodies and URL query strings. Other settings keep the SDK's defaults.
|
|
95
|
+
*/
|
|
96
|
+
dataCollection?: Record<string, unknown>;
|
|
97
|
+
/**
|
|
98
|
+
* Added to the default integrations that are kept, replacing any of the same name. A function
|
|
99
|
+
* receives those kept defaults instead and returns the full list.
|
|
100
|
+
*/
|
|
101
|
+
integrations?: ErrorMonitoringIntegration[] | ((defaults: ErrorMonitoringIntegration[]) => ErrorMonitoringIntegration[]);
|
|
50
102
|
/** Runs after the built-in filter, for breadcrumbs it keeps, with the SDK's hint. */
|
|
51
103
|
beforeBreadcrumb?: (breadcrumb: ErrorMonitoringBreadcrumb, hint?: ErrorMonitoringBreadcrumbHint) => ErrorMonitoringBreadcrumb | null;
|
|
104
|
+
/** Runs after the page URL's query string and fragment are stripped, with the SDK's hint. */
|
|
105
|
+
beforeSend?(event: ErrorMonitoringEvent, hint?: unknown): ErrorMonitoringEvent | null | PromiseLike<ErrorMonitoringEvent | null>;
|
|
106
|
+
/** Like `beforeSend`, for transactions. Wrapped only with `traceLifecycle: 'static'`. */
|
|
107
|
+
beforeSendTransaction?(event: ErrorMonitoringEvent, hint?: unknown): ErrorMonitoringEvent | null | PromiseLike<ErrorMonitoringEvent | null>;
|
|
108
|
+
/** Runs after span URLs and resource span names lose their query string and fragment. */
|
|
109
|
+
beforeSendSpan?(span: ErrorMonitoringSpan): ErrorMonitoringSpan;
|
|
52
110
|
[key: string]: unknown;
|
|
53
111
|
}
|
|
54
112
|
/**
|
|
@@ -84,9 +142,12 @@ export interface ErrorMonitoringOptions {
|
|
|
84
142
|
* and shared (`100.64.0.0/10`, as Tailscale uses) IP addresses, IPv4-mapped IPv6 included.
|
|
85
143
|
*/
|
|
86
144
|
environment?: string | ErrorMonitoringEnvironmentResolver;
|
|
87
|
-
/** Extra options
|
|
145
|
+
/** Extra options for the client's `init`, combined with the defaults as each one describes. */
|
|
88
146
|
initOptions?: ErrorMonitoringExtraInitOptions;
|
|
89
|
-
/**
|
|
147
|
+
/**
|
|
148
|
+
* Initialises the client in place of calling `client.init`. Set `traceLifecycle` in
|
|
149
|
+
* `initOptions`, not here: the defaults for tracing depend on it.
|
|
150
|
+
*/
|
|
90
151
|
init?: (options: ErrorMonitoringInitOptions) => unknown;
|
|
91
152
|
/** Records non-error foundation logs as breadcrumbs. Defaults to `true`. */
|
|
92
153
|
breadcrumbs?: boolean;
|
|
@@ -134,12 +195,18 @@ export declare const isFoundationLoggerConsoleBreadcrumb: (breadcrumb: ErrorMoni
|
|
|
134
195
|
* @remarks
|
|
135
196
|
* Without a DSN, or when no environment applies (by default on local hosts such as `localhost` or
|
|
136
197
|
* a private IP address), it does nothing and resolves `false`. The environment defaults to the
|
|
137
|
-
* page's hostname, so one image promoted across environments reports each under its own name
|
|
138
|
-
*
|
|
198
|
+
* page's hostname, so one image promoted across environments reports each under its own name. To
|
|
199
|
+
* use names such as `uat`, read one the deployment sets rather than listing hostnames, which would
|
|
200
|
+
* show everyone who loads the bundle where the other environments are. Otherwise it:
|
|
139
201
|
*
|
|
140
|
-
* - initialises the client (`client.init`, or `options.init`) with the DSN, environment,
|
|
141
|
-
* `
|
|
142
|
-
*
|
|
202
|
+
* - initialises the client (`client.init`, or `options.init`) with the DSN, the environment, any
|
|
203
|
+
* `initOptions`, and defaults that keep page data out of what the SDK collects by itself: Sentry
|
|
204
|
+
* 11's `dataCollection` off for user info, cookies, headers but `User-Agent`, bodies and URL
|
|
205
|
+
* queries; only the default integrations that send nothing from the page (so not `Console`); no
|
|
206
|
+
* console, click or input breadcrumbs; and no query strings or fragments in breadcrumb URLs, the
|
|
207
|
+
* page URL, or span URLs and resource span names when tracing is on. The app's
|
|
208
|
+
* `beforeBreadcrumb`, `beforeSend`, `beforeSendTransaction` and `beforeSendSpan` run after
|
|
209
|
+
* these, and its `integrations` are added;
|
|
143
210
|
* - registers a global log reporter ({@link createErrorMonitoringReporter}), so errors logged by
|
|
144
211
|
* every foundation logger, including those Genesis packages create at import time, are reported,
|
|
145
212
|
* and other logs become breadcrumbs. Only log messages and exceptions are sent, never logged data.
|
|
@@ -164,7 +231,8 @@ export declare const isFoundationLoggerConsoleBreadcrumb: (breadcrumb: ErrorMoni
|
|
|
164
231
|
*
|
|
165
232
|
* setupErrorMonitoring(Sentry, {
|
|
166
233
|
* dsn: 'https://<key>@<org>.ingest.sentry.io/<project>',
|
|
167
|
-
* environment: (
|
|
234
|
+
* environment: () =>
|
|
235
|
+
* document.querySelector<HTMLMetaElement>('meta[name="error-monitoring-environment"]')?.content,
|
|
168
236
|
* });
|
|
169
237
|
* ```
|
|
170
238
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-monitoring.d.ts","sourceRoot":"","sources":["../../../src/error-monitoring/error-monitoring.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEtE;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAA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