@utk09/ui-observability 0.6.0 → 0.7.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 +15 -0
- package/README.md +67 -25
- package/dist/{bus-ChIXDAWD.cjs → bus-DeZzr2bx.cjs} +2 -2
- package/dist/{bus-ChIXDAWD.cjs.map → bus-DeZzr2bx.cjs.map} +1 -1
- package/dist/{bus-BTMuVkDk.js → bus-DfAbg_pg.js} +2 -2
- package/dist/{bus-BTMuVkDk.js.map → bus-DfAbg_pg.js.map} +1 -1
- package/dist/constants-C8nZQBmQ.js +86 -0
- package/dist/constants-C8nZQBmQ.js.map +1 -0
- package/dist/constants-IBL_jd5R.cjs +2 -0
- package/dist/constants-IBL_jd5R.cjs.map +1 -0
- package/dist/constants.d.ts +4 -4
- package/dist/{errors-Dwm2SzBa.js → errors-4MQyjZVj.js} +3 -3
- package/dist/{errors-Dwm2SzBa.js.map → errors-4MQyjZVj.js.map} +1 -1
- package/dist/{errors-DRXBRqvm.cjs → errors-CUdShXe7.cjs} +2 -2
- package/dist/{errors-DRXBRqvm.cjs.map → errors-CUdShXe7.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +87 -66
- package/dist/index.js.map +1 -1
- package/dist/{indexeddb-storage-DjY4Ml6t.js → indexeddb-storage-0LtUALBg.js} +2 -2
- package/dist/{indexeddb-storage-DjY4Ml6t.js.map → indexeddb-storage-0LtUALBg.js.map} +1 -1
- package/dist/{indexeddb-storage-B5dwq4hW.cjs → indexeddb-storage-CcEJlq2l.cjs} +2 -2
- package/dist/{indexeddb-storage-B5dwq4hW.cjs.map → indexeddb-storage-CcEJlq2l.cjs.map} +1 -1
- package/dist/{interactions-DVom6eYn.cjs → interactions-BMNPQ3WH.cjs} +2 -2
- package/dist/{interactions-DVom6eYn.cjs.map → interactions-BMNPQ3WH.cjs.map} +1 -1
- package/dist/{interactions-DZmLu7l2.js → interactions-BaCmoGLB.js} +2 -2
- package/dist/{interactions-DZmLu7l2.js.map → interactions-BaCmoGLB.js.map} +1 -1
- package/dist/models/config.d.ts +30 -6
- package/dist/{network-CuqWadNn.cjs → network-DBNvxCE3.cjs} +2 -2
- package/dist/{network-CuqWadNn.cjs.map → network-DBNvxCE3.cjs.map} +1 -1
- package/dist/{network-C4d2uw2Z.js → network-jQ2t8rU4.js} +2 -2
- package/dist/{network-C4d2uw2Z.js.map → network-jQ2t8rU4.js.map} +1 -1
- package/dist/{platform-CXio0W2n.cjs → platform-ByQllE_W.cjs} +2 -2
- package/dist/{platform-CXio0W2n.cjs.map → platform-ByQllE_W.cjs.map} +1 -1
- package/dist/{platform-CY8S3hUs.js → platform-YuByH8A5.js} +2 -2
- package/dist/{platform-CY8S3hUs.js.map → platform-YuByH8A5.js.map} +1 -1
- package/dist/{sampling-CJsI_24L.js → sampling-CbYySsZ1.js} +2 -2
- package/dist/{sampling-CJsI_24L.js.map → sampling-CbYySsZ1.js.map} +1 -1
- package/dist/{sampling-CEthcmEX.cjs → sampling-Cs50xsZl.cjs} +2 -2
- package/dist/{sampling-CEthcmEX.cjs.map → sampling-Cs50xsZl.cjs.map} +1 -1
- package/dist/{sender-dpvR_bHM.js → sender-BIob8eZz.js} +4 -4
- package/dist/{sender-dpvR_bHM.js.map → sender-BIob8eZz.js.map} +1 -1
- package/dist/{sender-ByFAkXVd.cjs → sender-iOjzcueM.cjs} +2 -2
- package/dist/{sender-ByFAkXVd.cjs.map → sender-iOjzcueM.cjs.map} +1 -1
- package/dist/utils/console.d.ts +7 -6
- package/package.json +4 -2
- package/dist/constants-0-YchbAL.js +0 -75
- package/dist/constants-0-YchbAL.js.map +0 -1
- package/dist/constants-TUFcy95w.cjs +0 -2
- package/dist/constants-TUFcy95w.cjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { ObservabilityConfig } from "./models/config";
|
|
|
5
5
|
import type { MetricType } from "./models/log-record";
|
|
6
6
|
export { OneLogger };
|
|
7
7
|
export type { Journey, ObservabilityConfig, OneLoggerOptions };
|
|
8
|
+
export type { ConsoleOptions, ConsoleStyles } from "./models/config";
|
|
8
9
|
export type { WorkerLike } from "./bus/links";
|
|
9
10
|
export type { DiagnosticCode, DiagnosticEvent } from "./core/diagnostics";
|
|
10
11
|
export type { LogLevel, LogRecord, LogType, MetricType } from "./models/log-record";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { At as e, C as t, Ct as n, D as r, Dt as i, E as a, Et as o, F as s, Gt as c, M as l, Mt as u, N as d, Nt as f, Ot as p, Pt as m, Rt as h, St as g, T as _, Tt as ee, Vt as v, Yt as te, _ as ne, a as y, an as re, at as ie, bt as b, c as x, cn as ae, d as oe, g as se, h as ce, ht as le, i as ue, in as de, it as S, j as C, jt as fe, kt as pe, l as w, ln as me, m as he, mt as ge, n as T, nn as _e, nt as E, o as D, on as ve, p as ye, r as be, rn as xe, rt as Se, s as Ce, tt as we, u as O, un as k, wt as Te, zt as Ee } from "./constants-
|
|
2
|
-
import { _ as De, a as A, c as j, d as Oe, g as M, h as ke, i as Ae, l as je, m as N, n as Me, o as Ne, p as Pe, r as Fe, s as Ie, u as P } from "./sampling-
|
|
3
|
-
import { n as Le, r as Re, t as ze } from "./platform-
|
|
1
|
+
import { At as e, C as t, Ct as n, D as r, Dt as i, E as a, Et as o, F as s, Gt as c, M as l, Mt as u, N as d, Nt as f, Ot as p, Pt as m, Rt as h, St as g, T as _, Tt as ee, Vt as v, Yt as te, _ as ne, a as y, an as re, at as ie, bt as b, c as x, cn as ae, d as oe, g as se, h as ce, ht as le, i as ue, in as de, it as S, j as C, jt as fe, kt as pe, l as w, ln as me, m as he, mt as ge, n as T, nn as _e, nt as E, o as D, on as ve, p as ye, r as be, rn as xe, rt as Se, s as Ce, tt as we, u as O, un as k, wt as Te, zt as Ee } from "./constants-C8nZQBmQ.js";
|
|
2
|
+
import { _ as De, a as A, c as j, d as Oe, g as M, h as ke, i as Ae, l as je, m as N, n as Me, o as Ne, p as Pe, r as Fe, s as Ie, u as P } from "./sampling-CbYySsZ1.js";
|
|
3
|
+
import { n as Le, r as Re, t as ze } from "./platform-YuByH8A5.js";
|
|
4
4
|
import { t as Be } from "./unref-16maCyKA.js";
|
|
5
5
|
//#region src/utils/timer.ts
|
|
6
6
|
function F(e) {
|
|
@@ -160,23 +160,23 @@ var R = class e {
|
|
|
160
160
|
ERROR: "error",
|
|
161
161
|
FATAL: "error"
|
|
162
162
|
}, Ke = class {
|
|
163
|
-
|
|
163
|
+
settings;
|
|
164
164
|
diagnostics;
|
|
165
165
|
constructor(e, t) {
|
|
166
|
-
this.
|
|
166
|
+
this.settings = e, this.diagnostics = t;
|
|
167
167
|
}
|
|
168
168
|
update(e) {
|
|
169
|
-
this.
|
|
169
|
+
this.settings = e;
|
|
170
170
|
}
|
|
171
171
|
accepts(e) {
|
|
172
|
-
return this.
|
|
172
|
+
return this.settings.level !== null && S[e] >= S[this.settings.level];
|
|
173
173
|
}
|
|
174
|
-
write(e, t, n,
|
|
174
|
+
write(e, t, n, r, i) {
|
|
175
175
|
if (!this.accepts(t) || typeof console > "u") return;
|
|
176
|
-
let
|
|
176
|
+
let a = `%c[%s]%c[${t}]%c`, { styles: o } = this.settings, s = Ge[t];
|
|
177
177
|
this.diagnostics.guard("handler.threw", `The library could not print to console.${s}.`, () => {
|
|
178
|
-
let
|
|
179
|
-
|
|
178
|
+
let c = [];
|
|
179
|
+
i !== void 0 && c.push(i), r !== void 0 && c.push(Pe(r, b, this.diagnostics)), console[s](a, o.namespace, e, o[t], "", n, ...c);
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
182
|
}, qe = class {
|
|
@@ -284,8 +284,29 @@ function tt(e) {
|
|
|
284
284
|
function nt(e, t, n) {
|
|
285
285
|
return e === void 0 ? t ?? "otlp" : e === "otlp" || e === "ecs" || tt(e) ? e : (n.report("config.invalid", `serializer must be "${v}", "ecs" or an implementation. The library uses "${v}".`), v);
|
|
286
286
|
}
|
|
287
|
-
|
|
288
|
-
|
|
287
|
+
var rt = new Set(Object.keys(r));
|
|
288
|
+
function it(e, t) {
|
|
289
|
+
let n = {}, r = Object.entries(e ?? {});
|
|
290
|
+
for (let [e, i] of r) rt.has(e) ? typeof i == "string" ? n[e] = i : t.report("config.invalid", `console.styles.${e} must be a string. The library keeps the style in force.`) : t.report("config.invalid", `The library ignores the unknown console.styles key "${e}". Check the spelling.`);
|
|
291
|
+
return n;
|
|
292
|
+
}
|
|
293
|
+
function at(e, t, n) {
|
|
294
|
+
return e === void 0 ? t : e === !1 ? {
|
|
295
|
+
level: null,
|
|
296
|
+
styles: t.styles
|
|
297
|
+
} : e === !0 ? {
|
|
298
|
+
level: a,
|
|
299
|
+
styles: t.styles
|
|
300
|
+
} : typeof e == "string" ? {
|
|
301
|
+
level: e,
|
|
302
|
+
styles: t.styles
|
|
303
|
+
} : typeof e != "object" || !e ? (n.report("config.invalid", "console must be a boolean, a level or an object. The console settings in force stay."), t) : {
|
|
304
|
+
level: e.level ?? t.level ?? "DEBUG",
|
|
305
|
+
styles: {
|
|
306
|
+
...t.styles,
|
|
307
|
+
...it(e.styles, n)
|
|
308
|
+
}
|
|
309
|
+
};
|
|
289
310
|
}
|
|
290
311
|
function H(e, t, n) {
|
|
291
312
|
let r = n ?? C, i = {
|
|
@@ -293,7 +314,7 @@ function H(e, t, n) {
|
|
|
293
314
|
...e,
|
|
294
315
|
endpoint: e.endpoint === void 0 ? r.endpoint : e.endpoint,
|
|
295
316
|
serializer: nt(e.serializer, n?.serializer, t),
|
|
296
|
-
console:
|
|
317
|
+
console: at(e.console, r.console, t),
|
|
297
318
|
sampling: {
|
|
298
319
|
...r.sampling,
|
|
299
320
|
...e.sampling,
|
|
@@ -322,9 +343,9 @@ function H(e, t, n) {
|
|
|
322
343
|
(typeof a != "number" || a < 0 || a > 1) && (t.report("config.invalid", `sampling.defaultRate must be 0..1. The value is ${String(a)}. The library uses 1.`), i.sampling.defaultRate = 1);
|
|
323
344
|
let o = Object.entries(i.sampling.rates);
|
|
324
345
|
for (let [e, n] of o) (typeof n != "number" || n < 0 || n > 1) && (t.report("config.invalid", `sampling.rates["${e}"] must be 0..1. The value is ${String(n)}. The library uses 1.`), i.sampling.rates[e] = 1);
|
|
325
|
-
return i.capture.ignoreUrls = i.capture.ignoreUrls.filter((e) => e !== n?.endpoint), i.endpoint && !i.capture.ignoreUrls.includes(i.endpoint) && (i.capture.ignoreUrls = [...i.capture.ignoreUrls, i.endpoint]),
|
|
346
|
+
return i.capture.ignoreUrls = i.capture.ignoreUrls.filter((e) => e !== n?.endpoint), i.endpoint && !i.capture.ignoreUrls.includes(i.endpoint) && (i.capture.ignoreUrls = [...i.capture.ignoreUrls, i.endpoint]), ot(e, t), i;
|
|
326
347
|
}
|
|
327
|
-
function
|
|
348
|
+
function ot(e, t) {
|
|
328
349
|
let n = /* @__PURE__ */ new Set([...Object.keys(C), ...ae]);
|
|
329
350
|
for (let r of Object.keys(e)) n.has(r) || t.report("config.invalid", `The library ignores the unknown config key "${r}". Check the spelling.`);
|
|
330
351
|
for (let n of _) {
|
|
@@ -334,13 +355,13 @@ function it(e, t) {
|
|
|
334
355
|
for (let e of Object.keys(r)) i.has(e) || t.report("config.invalid", `The library ignores the unknown config key "${n}.${e}". Check the spelling.`);
|
|
335
356
|
}
|
|
336
357
|
}
|
|
337
|
-
function
|
|
358
|
+
function st(e, t) {
|
|
338
359
|
for (let n of Object.keys(t)) _.includes(n) || Object.assign(e, { [n]: t[n] });
|
|
339
360
|
for (let n of _) Object.assign(e[n], t[n]);
|
|
340
361
|
}
|
|
341
362
|
//#endregion
|
|
342
363
|
//#region src/core/context.ts
|
|
343
|
-
var
|
|
364
|
+
var ct = class {
|
|
344
365
|
map = /* @__PURE__ */ new Map();
|
|
345
366
|
set(e, t) {
|
|
346
367
|
this.map.set(e, t);
|
|
@@ -360,7 +381,7 @@ var ot = class {
|
|
|
360
381
|
getAll() {
|
|
361
382
|
return Object.fromEntries(this.map);
|
|
362
383
|
}
|
|
363
|
-
},
|
|
384
|
+
}, lt = class {
|
|
364
385
|
handler;
|
|
365
386
|
throttleMs;
|
|
366
387
|
counters = /* @__PURE__ */ new Map();
|
|
@@ -415,7 +436,7 @@ var ot = class {
|
|
|
415
436
|
reset() {
|
|
416
437
|
this.counters.clear(), this.lastEmitted.clear();
|
|
417
438
|
}
|
|
418
|
-
},
|
|
439
|
+
}, ut = {
|
|
419
440
|
maxAgeMs: we,
|
|
420
441
|
endOnOwnerClose: !1,
|
|
421
442
|
urlParam: Se
|
|
@@ -428,7 +449,7 @@ function W(e, t) {
|
|
|
428
449
|
let n = Reflect.get(e, t);
|
|
429
450
|
return typeof n == "number" && Number.isFinite(n) ? n : void 0;
|
|
430
451
|
}
|
|
431
|
-
function
|
|
452
|
+
function dt(e) {
|
|
432
453
|
if (typeof e != "object" || !e) return null;
|
|
433
454
|
let t = U(e, "id"), n = U(e, "name"), r = W(e, "startedAt");
|
|
434
455
|
return t === void 0 || n === void 0 || r === void 0 ? null : {
|
|
@@ -439,7 +460,7 @@ function lt(e) {
|
|
|
439
460
|
ownerContextId: U(e, "ownerContextId") ?? ""
|
|
440
461
|
};
|
|
441
462
|
}
|
|
442
|
-
function
|
|
463
|
+
function ft(e) {
|
|
443
464
|
if (typeof e != "object" || !e) return null;
|
|
444
465
|
let t = U(e, "i"), n = U(e, "n");
|
|
445
466
|
return t === void 0 || n === void 0 ? null : {
|
|
@@ -450,7 +471,7 @@ function ut(e) {
|
|
|
450
471
|
ownerContextId: ""
|
|
451
472
|
};
|
|
452
473
|
}
|
|
453
|
-
function
|
|
474
|
+
function pt(e) {
|
|
454
475
|
let t = JSON.stringify({
|
|
455
476
|
i: e.id,
|
|
456
477
|
n: e.name.slice(0, 64),
|
|
@@ -459,7 +480,7 @@ function dt(e) {
|
|
|
459
480
|
for (let e of n) r += String.fromCharCode(e);
|
|
460
481
|
return btoa(r).replace(se, "-").replace(ne, "_").replace(ce, "");
|
|
461
482
|
}
|
|
462
|
-
var
|
|
483
|
+
var mt = class {
|
|
463
484
|
options;
|
|
464
485
|
diagnostics;
|
|
465
486
|
contextId;
|
|
@@ -501,7 +522,7 @@ var ft = class {
|
|
|
501
522
|
getToken() {
|
|
502
523
|
let e = this.journey;
|
|
503
524
|
if (e === null) return;
|
|
504
|
-
let t =
|
|
525
|
+
let t = pt(e);
|
|
505
526
|
if (t.length > 256) this.diagnostics.report("journey.token_too_large", "The journey token is larger than the size limit. The library does not issue it.", { length: t.length });
|
|
506
527
|
else return t;
|
|
507
528
|
}
|
|
@@ -522,7 +543,7 @@ var ft = class {
|
|
|
522
543
|
this.clearTimer();
|
|
523
544
|
}
|
|
524
545
|
restore(e) {
|
|
525
|
-
let t =
|
|
546
|
+
let t = dt(this.diagnostics.guard("storage.degraded", "The library could not parse the persisted journey.", () => JSON.parse(e)));
|
|
526
547
|
return t === null ? !1 : Date.now() - t.startedAt > this.options.maxAgeMs ? (this.diagnostics.report("journey.expired", "The library discarded a persisted journey older than maxAgeMs.", { name: t.name }), this.clearStored(), !1) : (this.setJourney(t), this.diagnostics.report("journey.adopted", `The library resumed the journey "${t.name}".`, {
|
|
527
548
|
source: "sessionStorage",
|
|
528
549
|
journeyId: t.id
|
|
@@ -531,7 +552,7 @@ var ft = class {
|
|
|
531
552
|
decodeToken(e) {
|
|
532
553
|
return this.diagnostics.guard("config.invalid", "The library could not decode a seeded journey token.", () => {
|
|
533
554
|
let t = e.replace(ye, "+").replace(he, "/"), n = (4 - t.length % 4) % 4, r = "=".repeat(n), i = Uint8Array.from(atob(t + r), (e) => e.charCodeAt(0));
|
|
534
|
-
return
|
|
555
|
+
return ft(JSON.parse(new TextDecoder().decode(i)));
|
|
535
556
|
}) ?? null;
|
|
536
557
|
}
|
|
537
558
|
setJourney(e) {
|
|
@@ -566,7 +587,7 @@ var ft = class {
|
|
|
566
587
|
function G(e) {
|
|
567
588
|
return e;
|
|
568
589
|
}
|
|
569
|
-
var
|
|
590
|
+
var ht = class {
|
|
570
591
|
deps;
|
|
571
592
|
resourceCache = null;
|
|
572
593
|
constructor(e) {
|
|
@@ -673,10 +694,10 @@ var pt = class {
|
|
|
673
694
|
...a.openfinName === void 0 ? {} : { [o]: a.openfinName }
|
|
674
695
|
}, this.resourceCache;
|
|
675
696
|
}
|
|
676
|
-
},
|
|
677
|
-
errors: async () => (await import("./errors-
|
|
678
|
-
network: async () => (await import("./network-
|
|
679
|
-
interactions: async () => (await import("./interactions-
|
|
697
|
+
}, gt = {
|
|
698
|
+
errors: async () => (await import("./errors-4MQyjZVj.js")).ErrorCapture,
|
|
699
|
+
network: async () => (await import("./network-jQ2t8rU4.js")).NetworkCapture,
|
|
700
|
+
interactions: async () => (await import("./interactions-BaCmoGLB.js")).InteractionCapture,
|
|
680
701
|
webVitals: async () => (await import("./web-vitals-DHZ0yA_H.js")).WebVitalsCapture
|
|
681
702
|
}, K = Symbol.for(h), q = Symbol.for(Ee), J = class e {
|
|
682
703
|
diagnostics;
|
|
@@ -686,7 +707,7 @@ var pt = class {
|
|
|
686
707
|
stores;
|
|
687
708
|
identityBuiltAs;
|
|
688
709
|
sessionTouch;
|
|
689
|
-
context = new
|
|
710
|
+
context = new ct();
|
|
690
711
|
breadcrumbs;
|
|
691
712
|
tracing;
|
|
692
713
|
sequence = new qe();
|
|
@@ -714,9 +735,9 @@ var pt = class {
|
|
|
714
735
|
destroyed = !1;
|
|
715
736
|
lastGapAt = 0;
|
|
716
737
|
constructor(e) {
|
|
717
|
-
this.diagnostics = new
|
|
738
|
+
this.diagnostics = new lt(e.onDiagnostic), this.platform = Le(this.diagnostics), this.config = H(e, this.diagnostics), this.identityBuiltAs = this.config.identity, this.stores = this.identityBuiltAs === "memory" ? Ie() : A, this.identity = Oe(this.diagnostics, this.stores), this.sessionTouch = new Ne(this.diagnostics, this.stores), this.breadcrumbs = new et(50), this.tracing = new $e(this.diagnostics, void 0, this.config.otelLoader), this.tracing.loadOtel(), this.console = new Ke(this.config.console, this.diagnostics), this.journey = new mt(ut, this.diagnostics, this.identity.contextId, (e) => {
|
|
718
739
|
this.bus?.broadcastJourney(e);
|
|
719
|
-
}, this.stores), this.builder = new
|
|
740
|
+
}, this.stores), this.builder = new ht({
|
|
720
741
|
config: this.config,
|
|
721
742
|
limits: b,
|
|
722
743
|
diagnostics: this.diagnostics,
|
|
@@ -752,7 +773,7 @@ var pt = class {
|
|
|
752
773
|
}
|
|
753
774
|
reconfigure(e) {
|
|
754
775
|
let t = this.keepEndpoint(e);
|
|
755
|
-
|
|
776
|
+
st(this.config, H(t, this.diagnostics, this.config)), this.diagnostics.setHandler(this.config.onDiagnostic), this.builder.invalidateResource(), this.console.update(this.config.console), this.keepBuiltStorage(), this.keepBuiltIdentity(), this.installCaptures(), this.roleResolved && this.syncSender(), this.diagnostics.report("config.reconfigured", "A later configure() call updated the runtime.");
|
|
756
777
|
}
|
|
757
778
|
keepBuiltStorage() {
|
|
758
779
|
let e = this.storageBuiltAs;
|
|
@@ -797,7 +818,7 @@ var pt = class {
|
|
|
797
818
|
}
|
|
798
819
|
async buildBus() {
|
|
799
820
|
try {
|
|
800
|
-
let { Bus: e } = await import("./bus-
|
|
821
|
+
let { Bus: e } = await import("./bus-DfAbg_pg.js");
|
|
801
822
|
if (this.destroyed) return null;
|
|
802
823
|
let t = new e(this.config, this.diagnostics, this.platform, this.identity.contextId, this.identity.tabId, {
|
|
803
824
|
onRecords: (e) => {
|
|
@@ -828,7 +849,7 @@ var pt = class {
|
|
|
828
849
|
async buildSender() {
|
|
829
850
|
this.storageBuiltAs = this.config.storage;
|
|
830
851
|
try {
|
|
831
|
-
let { Sender: e } = await import("./sender-
|
|
852
|
+
let { Sender: e } = await import("./sender-BIob8eZz.js"), t = this.destroyed ? null : await e.create({
|
|
832
853
|
config: this.config,
|
|
833
854
|
diagnostics: this.diagnostics,
|
|
834
855
|
onGap: this.reportGap
|
|
@@ -871,7 +892,7 @@ var pt = class {
|
|
|
871
892
|
this.captures.length = 0;
|
|
872
893
|
}
|
|
873
894
|
loadCapture(e) {
|
|
874
|
-
return this.diagnostics.guardAsync("capture.install_failed", `The library could not load the ${e} capture.`,
|
|
895
|
+
return this.diagnostics.guardAsync("capture.install_failed", `The library could not load the ${e} capture.`, gt[e]);
|
|
875
896
|
}
|
|
876
897
|
registerWorker(e) {
|
|
877
898
|
this.destroyed || this.constructBus().then((t) => {
|
|
@@ -943,7 +964,7 @@ var pt = class {
|
|
|
943
964
|
function X() {
|
|
944
965
|
return (J.current() ?? J.stopped()) || J.configure({});
|
|
945
966
|
}
|
|
946
|
-
function
|
|
967
|
+
function _t(e) {
|
|
947
968
|
J.configure(e);
|
|
948
969
|
}
|
|
949
970
|
function Z(e, t) {
|
|
@@ -954,82 +975,82 @@ function Z(e, t) {
|
|
|
954
975
|
function Q() {
|
|
955
976
|
return Z("app");
|
|
956
977
|
}
|
|
957
|
-
function
|
|
978
|
+
function vt(e, t) {
|
|
958
979
|
Q().trace(e, t);
|
|
959
980
|
}
|
|
960
|
-
function
|
|
981
|
+
function yt(e, t) {
|
|
961
982
|
Q().debug(e, t);
|
|
962
983
|
}
|
|
963
|
-
function
|
|
984
|
+
function bt(e, t) {
|
|
964
985
|
Q().info(e, t);
|
|
965
986
|
}
|
|
966
|
-
function
|
|
987
|
+
function xt(e, t) {
|
|
967
988
|
Q().warn(e, t);
|
|
968
989
|
}
|
|
969
|
-
function
|
|
990
|
+
function St(e, t, n) {
|
|
970
991
|
Q().error(e, t, n);
|
|
971
992
|
}
|
|
972
|
-
function
|
|
993
|
+
function Ct(e, t) {
|
|
973
994
|
Q().logAction(e, t);
|
|
974
995
|
}
|
|
975
|
-
function
|
|
996
|
+
function wt(e, t) {
|
|
976
997
|
Q().logEvent(e, t);
|
|
977
998
|
}
|
|
978
|
-
function
|
|
999
|
+
function Tt(e, t, n, r, i) {
|
|
979
1000
|
Q().logMetric(e, t, n, r, i);
|
|
980
1001
|
}
|
|
981
|
-
function
|
|
1002
|
+
function Et(e, t, n) {
|
|
982
1003
|
return Q().timeSync(e, t, n);
|
|
983
1004
|
}
|
|
984
|
-
function
|
|
1005
|
+
function $(e, t, n) {
|
|
985
1006
|
return Q().timeAsync(e, t, n);
|
|
986
1007
|
}
|
|
987
|
-
function
|
|
1008
|
+
function Dt(e, t) {
|
|
988
1009
|
X().context.set(e, t);
|
|
989
1010
|
}
|
|
990
|
-
function
|
|
1011
|
+
function Ot(e) {
|
|
991
1012
|
X().context.setMany(e);
|
|
992
1013
|
}
|
|
993
|
-
function
|
|
1014
|
+
function kt(e) {
|
|
994
1015
|
X().context.remove(e);
|
|
995
1016
|
}
|
|
996
|
-
function
|
|
1017
|
+
function At(e, t) {
|
|
997
1018
|
return X().journey.start(e, t);
|
|
998
1019
|
}
|
|
999
|
-
function
|
|
1020
|
+
function jt() {
|
|
1000
1021
|
X().journey.end();
|
|
1001
1022
|
}
|
|
1002
|
-
function
|
|
1023
|
+
function Mt() {
|
|
1003
1024
|
return X().journey.current();
|
|
1004
1025
|
}
|
|
1005
|
-
function
|
|
1026
|
+
function Nt() {
|
|
1006
1027
|
return X().journey.getToken();
|
|
1007
1028
|
}
|
|
1008
|
-
function
|
|
1029
|
+
function Pt(e) {
|
|
1009
1030
|
return X().journey.adopt(e, "manual", !0);
|
|
1010
1031
|
}
|
|
1011
|
-
function
|
|
1032
|
+
function Ft(e) {
|
|
1012
1033
|
X().registerWorker(e);
|
|
1013
1034
|
}
|
|
1014
|
-
function
|
|
1035
|
+
function It() {
|
|
1015
1036
|
X().tracing.rotate("explicit");
|
|
1016
1037
|
}
|
|
1017
|
-
function
|
|
1038
|
+
function Lt() {
|
|
1018
1039
|
return X().tracing.headers();
|
|
1019
1040
|
}
|
|
1020
|
-
function
|
|
1041
|
+
function Rt() {
|
|
1021
1042
|
return X().flush();
|
|
1022
1043
|
}
|
|
1023
|
-
function
|
|
1044
|
+
function zt() {
|
|
1024
1045
|
return X().queueDepth();
|
|
1025
1046
|
}
|
|
1026
|
-
function
|
|
1047
|
+
function Bt() {
|
|
1027
1048
|
return X().diagnostics.snapshot();
|
|
1028
1049
|
}
|
|
1029
|
-
async function
|
|
1050
|
+
async function Vt() {
|
|
1030
1051
|
await J.current()?.destroy();
|
|
1031
1052
|
}
|
|
1032
1053
|
//#endregion
|
|
1033
|
-
export { R as OneLogger,
|
|
1054
|
+
export { R as OneLogger, Pt as adoptJourney, _t as configure, Mt as currentJourney, yt as debug, jt as endJourney, St as error, Rt as flush, Bt as getDiagnosticCounters, Nt as getJourneyToken, Z as getLogger, zt as getQueueDepth, Lt as getTraceHeaders, bt as info, Ct as logAction, wt as logEvent, Tt as logMetric, Ft as registerWorker, kt as removeContext, Dt as setContext, Ot as setContextMap, Vt as shutdown, At as startJourney, It as startTrace, $ as timeAsync, Et as timeSync, vt as trace, xt as warn };
|
|
1034
1055
|
|
|
1035
1056
|
//# sourceMappingURL=index.js.map
|