@utk09/ui-observability 0.9.2 → 0.9.3

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 (142) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/batch-D5qvsMQ_.cjs +2 -0
  3. package/dist/batch-D5qvsMQ_.cjs.map +1 -0
  4. package/dist/{batch-4xKzzSCj.js → batch-DDgxg16_.js} +7 -4
  5. package/dist/batch-DDgxg16_.js.map +1 -0
  6. package/dist/bus/bus.d.ts +0 -4
  7. package/dist/{bus-DrixwdiX.js → bus-C6RwKzPW.js} +59 -62
  8. package/dist/bus-C6RwKzPW.js.map +1 -0
  9. package/dist/bus-WPVDFw2y.cjs +2 -0
  10. package/dist/bus-WPVDFw2y.cjs.map +1 -0
  11. package/dist/capture/storm.d.ts +2 -7
  12. package/dist/{console-ChfuJlf9.cjs → console-BSusX_M-.cjs} +2 -2
  13. package/dist/{console-ChfuJlf9.cjs.map → console-BSusX_M-.cjs.map} +1 -1
  14. package/dist/{console-B3vGRW5p.js → console-Dv5GfaNn.js} +3 -3
  15. package/dist/{console-B3vGRW5p.js.map → console-Dv5GfaNn.js.map} +1 -1
  16. package/dist/{constants-Be83LICb.cjs → constants-Cb92egPS.cjs} +2 -2
  17. package/dist/constants-Cb92egPS.cjs.map +1 -0
  18. package/dist/{constants-CQ_D7jIW.js → constants-DhH6VI5a.js} +2 -2
  19. package/dist/constants-DhH6VI5a.js.map +1 -0
  20. package/dist/constants.d.ts +2 -3
  21. package/dist/core/breadcrumbs.d.ts +1 -3
  22. package/dist/core/context.d.ts +0 -8
  23. package/dist/core/diagnostics.d.ts +0 -2
  24. package/dist/core/sampling.d.ts +1 -3
  25. package/dist/deadline-CUrH0Hd8.cjs +2 -0
  26. package/dist/deadline-CUrH0Hd8.cjs.map +1 -0
  27. package/dist/deadline-DeqXEliN.js +31 -0
  28. package/dist/deadline-DeqXEliN.js.map +1 -0
  29. package/dist/{errors-BGs5NOrw.js → errors-DCZWcHkd.js} +4 -4
  30. package/dist/{errors-BGs5NOrw.js.map → errors-DCZWcHkd.js.map} +1 -1
  31. package/dist/{errors-BMJm7KZZ.cjs → errors-ERu-su8m.cjs} +3 -3
  32. package/dist/{errors-BMJm7KZZ.cjs.map → errors-ERu-su8m.cjs.map} +1 -1
  33. package/dist/fixed-window-BR0bu32Y.cjs +2 -0
  34. package/dist/fixed-window-BR0bu32Y.cjs.map +1 -0
  35. package/dist/fixed-window-Re7jIRJH.js +9 -0
  36. package/dist/fixed-window-Re7jIRJH.js.map +1 -0
  37. package/dist/{identity-DXyV86o-.cjs → identity-C1WLItSl.cjs} +2 -2
  38. package/dist/{identity-DXyV86o-.cjs.map → identity-C1WLItSl.cjs.map} +1 -1
  39. package/dist/{identity-rpEyjvVg.js → identity-Di-QXGCC.js} +2 -2
  40. package/dist/{identity-rpEyjvVg.js.map → identity-Di-QXGCC.js.map} +1 -1
  41. package/dist/index.cjs +1 -1
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/index.js +224 -236
  44. package/dist/index.js.map +1 -1
  45. package/dist/indexeddb-storage-DX18p39D.cjs +2 -0
  46. package/dist/indexeddb-storage-DX18p39D.cjs.map +1 -0
  47. package/dist/{indexeddb-storage-Q9fDYlyn.js → indexeddb-storage-T9YIYVYC.js} +39 -50
  48. package/dist/indexeddb-storage-T9YIYVYC.js.map +1 -0
  49. package/dist/{interactions-B8zjCjga.js → interactions-BLH_tX87.js} +2 -2
  50. package/dist/{interactions-B8zjCjga.js.map → interactions-BLH_tX87.js.map} +1 -1
  51. package/dist/{interactions-BAGRmtrv.cjs → interactions-_hfOerfC.cjs} +2 -2
  52. package/dist/{interactions-BAGRmtrv.cjs.map → interactions-_hfOerfC.cjs.map} +1 -1
  53. package/dist/journey-BRUj0hqD.cjs +2 -0
  54. package/dist/journey-BRUj0hqD.cjs.map +1 -0
  55. package/dist/{journey-_dQQ1eMP.js → journey-yALMEWF7.js} +26 -25
  56. package/dist/journey-yALMEWF7.js.map +1 -0
  57. package/dist/{library-request-BIG3Xpx3.cjs → library-request-BcAxuwsf.cjs} +2 -2
  58. package/dist/{library-request-BIG3Xpx3.cjs.map → library-request-BcAxuwsf.cjs.map} +1 -1
  59. package/dist/{library-request-DX6ev9oG.js → library-request-CQD4HUiP.js} +2 -2
  60. package/dist/{library-request-DX6ev9oG.js.map → library-request-CQD4HUiP.js.map} +1 -1
  61. package/dist/{long-frames-Cq2LgNnp.cjs → long-frames-D4Bm3Zkz.cjs} +2 -2
  62. package/dist/{long-frames-Cq2LgNnp.cjs.map → long-frames-D4Bm3Zkz.cjs.map} +1 -1
  63. package/dist/{long-frames-B0tKuChx.js → long-frames-DD_Um9_4.js} +3 -3
  64. package/dist/{long-frames-B0tKuChx.js.map → long-frames-DD_Um9_4.js.map} +1 -1
  65. package/dist/models/batch.d.ts +6 -0
  66. package/dist/{network-CMnEvGJB.js → network--GoE7_Or.js} +3 -3
  67. package/dist/{network-CMnEvGJB.js.map → network--GoE7_Or.js.map} +1 -1
  68. package/dist/{network-C6kJbW6K.cjs → network-DcuS2H1P.cjs} +2 -2
  69. package/dist/{network-C6kJbW6K.cjs.map → network-DcuS2H1P.cjs.map} +1 -1
  70. package/dist/openfin-BwEN0uj4.js +8 -0
  71. package/dist/openfin-BwEN0uj4.js.map +1 -0
  72. package/dist/openfin-DtH2f7zX.cjs +2 -0
  73. package/dist/openfin-DtH2f7zX.cjs.map +1 -0
  74. package/dist/{platform-j0uMPwHi.js → platform-GaM6h7XM.js} +25 -21
  75. package/dist/platform-GaM6h7XM.js.map +1 -0
  76. package/dist/platform-kIL5AZB7.cjs +2 -0
  77. package/dist/platform-kIL5AZB7.cjs.map +1 -0
  78. package/dist/{remote-rules-UggoZqfP.js → remote-rules-6ePq8CrI.js} +19 -21
  79. package/dist/remote-rules-6ePq8CrI.js.map +1 -0
  80. package/dist/remote-rules-CI3gbRCL.cjs +2 -0
  81. package/dist/remote-rules-CI3gbRCL.cjs.map +1 -0
  82. package/dist/sampling-C-M8p3FK.cjs +2 -0
  83. package/dist/sampling-C-M8p3FK.cjs.map +1 -0
  84. package/dist/sampling-Ud_WiuU9.js +65 -0
  85. package/dist/sampling-Ud_WiuU9.js.map +1 -0
  86. package/dist/{sanitize-BqzPc4Jg.cjs → sanitize--_e4oOPX.cjs} +2 -2
  87. package/dist/{sanitize-BqzPc4Jg.cjs.map → sanitize--_e4oOPX.cjs.map} +1 -1
  88. package/dist/{sanitize-BNwgPj_B.js → sanitize-DP0xDPrt.js} +2 -2
  89. package/dist/{sanitize-BNwgPj_B.js.map → sanitize-DP0xDPrt.js.map} +1 -1
  90. package/dist/sender-BESHz6my.cjs +3 -0
  91. package/dist/sender-BESHz6my.cjs.map +1 -0
  92. package/dist/{sender--0_VzPbN.js → sender-BUBWLn5i.js} +202 -207
  93. package/dist/sender-BUBWLn5i.js.map +1 -0
  94. package/dist/storage/gap.d.ts +20 -0
  95. package/dist/storage/indexeddb-storage.d.ts +1 -7
  96. package/dist/storage/keys.d.ts +9 -0
  97. package/dist/storage/local-storage.d.ts +0 -6
  98. package/dist/storage/memory-storage.d.ts +1 -1
  99. package/dist/storm-DhHGHhOc.cjs +2 -0
  100. package/dist/storm-DhHGHhOc.cjs.map +1 -0
  101. package/dist/storm-OD5J6Ylm.js +10 -0
  102. package/dist/storm-OD5J6Ylm.js.map +1 -0
  103. package/dist/utils/fixed-window.d.ts +15 -0
  104. package/dist/utils/guards.d.ts +6 -0
  105. package/dist/utils/openfin.d.ts +48 -0
  106. package/dist/utils/platform.d.ts +5 -0
  107. package/package.json +2 -3
  108. package/dist/batch-4xKzzSCj.js.map +0 -1
  109. package/dist/batch-cys7e53Q.cjs +0 -2
  110. package/dist/batch-cys7e53Q.cjs.map +0 -1
  111. package/dist/bus-B6vzPmQM.cjs +0 -2
  112. package/dist/bus-B6vzPmQM.cjs.map +0 -1
  113. package/dist/bus-DrixwdiX.js.map +0 -1
  114. package/dist/constants-Be83LICb.cjs.map +0 -1
  115. package/dist/constants-CQ_D7jIW.js.map +0 -1
  116. package/dist/deadline-5_PecIl5.js +0 -26
  117. package/dist/deadline-5_PecIl5.js.map +0 -1
  118. package/dist/deadline-XSnm95pg.cjs +0 -2
  119. package/dist/deadline-XSnm95pg.cjs.map +0 -1
  120. package/dist/indexeddb-storage-BXaPVPyG.cjs +0 -2
  121. package/dist/indexeddb-storage-BXaPVPyG.cjs.map +0 -1
  122. package/dist/indexeddb-storage-Q9fDYlyn.js.map +0 -1
  123. package/dist/journey-BGSyy8Es.cjs +0 -2
  124. package/dist/journey-BGSyy8Es.cjs.map +0 -1
  125. package/dist/journey-_dQQ1eMP.js.map +0 -1
  126. package/dist/platform-DNOJjpOm.cjs +0 -2
  127. package/dist/platform-DNOJjpOm.cjs.map +0 -1
  128. package/dist/platform-j0uMPwHi.js.map +0 -1
  129. package/dist/remote-rules-DgoBJxZL.cjs +0 -2
  130. package/dist/remote-rules-DgoBJxZL.cjs.map +0 -1
  131. package/dist/remote-rules-UggoZqfP.js.map +0 -1
  132. package/dist/sampling-BLMD8EGM.js +0 -64
  133. package/dist/sampling-BLMD8EGM.js.map +0 -1
  134. package/dist/sampling-MthcVXXU.cjs +0 -2
  135. package/dist/sampling-MthcVXXU.cjs.map +0 -1
  136. package/dist/sender--0_VzPbN.js.map +0 -1
  137. package/dist/sender-SPGMqZjD.cjs +0 -3
  138. package/dist/sender-SPGMqZjD.cjs.map +0 -1
  139. package/dist/storm-CTy1dfvs.cjs +0 -2
  140. package/dist/storm-CTy1dfvs.cjs.map +0 -1
  141. package/dist/storm-knaj4GUH.js +0 -10
  142. package/dist/storm-knaj4GUH.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { A as e, At as t, Bt as n, Cn as r, D as i, F as a, Ft as o, Gt as s, Ht as c, I as l, It as u, Kt as d, L as f, Lt as p, Qt as m, Rt as h, S as g, Sn as _, Ut as ee, Vt as te, Wt as ne, Zt as re, _n as ie, _t as ae, a as v, c as y, d as b, en as x, f as oe, ft as se, gn as S, hn as ce, i as le, in as ue, j as de, k as C, l as fe, lt as pe, m as me, mn as he, n as w, o as ge, p as T, qt as _e, r as ve, s as E, sn as ye, u as D, ut as O, vn as be, vt as k, xn as xe, yt as Se, z as Ce, zt as we } from "./constants-CQ_D7jIW.js";
1
+ import { A as e, At as t, Bt as n, Cn as r, D as i, F as a, Ft as o, Gt as s, Ht as c, I as l, It as u, Kt as d, L as f, Lt as p, Qt as m, Rt as h, S as g, Sn as _, Ut as ee, Vt as te, Wt as ne, Zt as re, _n as ie, _t as ae, a as v, c as y, d as b, en as x, f as oe, ft as se, gn as S, hn as ce, i as le, in as ue, j as de, k as C, l as fe, lt as pe, m as me, mn as he, n as w, o as ge, p as T, qt as _e, r as ve, s as E, sn as ye, u as D, ut as O, vn as be, vt as k, xn as xe, yt as Se, z as Ce, zt as we } from "./constants-DhH6VI5a.js";
2
2
  import { n as Te, r as Ee, t as De } from "./error-like-Ywo5uRHo.js";
3
- import { a as Oe, i as ke, n as Ae, o as je, r as Me } from "./sampling-BLMD8EGM.js";
4
- import { a as Ne, i as Pe, n as Fe, o as A, r as j } from "./sanitize-BNwgPj_B.js";
5
- import { a as Ie, i as Le, n as Re, o as ze, r as Be, s as Ve, t as He } from "./identity-rpEyjvVg.js";
6
- import { n as Ue, r as We, t as Ge } from "./platform-j0uMPwHi.js";
7
- import { n as M, t as Ke } from "./batch-4xKzzSCj.js";
8
- import { r as qe } from "./library-request-DX6ev9oG.js";
9
- import { r as Je } from "./deadline-5_PecIl5.js";
10
- import { n as Ye, t as Xe } from "./journey-_dQQ1eMP.js";
3
+ import { i as Oe, r as ke } from "./deadline-DeqXEliN.js";
4
+ import { a as Ae, i as je, n as Me, o as Ne, r as Pe } from "./sampling-Ud_WiuU9.js";
5
+ import { a as Fe, i as Ie, n as Le, o as A, r as j } from "./sanitize-DP0xDPrt.js";
6
+ import { a as Re, i as ze, n as Be, o as Ve, r as He, s as Ue, t as We } from "./identity-Di-QXGCC.js";
7
+ import { i as Ge, n as Ke, t as qe } from "./platform-GaM6h7XM.js";
8
+ import { r as M, t as Je } from "./batch-DDgxg16_.js";
9
+ import { r as Ye } from "./library-request-CQD4HUiP.js";
10
+ import { n as Xe, t as Ze } from "./journey-yALMEWF7.js";
11
11
  //#region src/utils/timer.ts
12
12
  function N(e) {
13
13
  return Math.round((performance.now() - e) * Ce) / Ce;
@@ -18,7 +18,7 @@ function P(e, t, n, r, i) {
18
18
  ...i
19
19
  });
20
20
  }
21
- function Ze(e, t, n, r, i) {
21
+ function Qe(e, t, n, r, i) {
22
22
  let a = N(n);
23
23
  e.error(`${t} failed`, r, {
24
24
  "action.duration_ms": a,
@@ -26,28 +26,28 @@ function Ze(e, t, n, r, i) {
26
26
  ...i
27
27
  }), P(e, t, a, "FAILURE", i);
28
28
  }
29
- function Qe(e, t, n, r) {
29
+ function $e(e, t, n, r) {
30
30
  let i = performance.now();
31
31
  try {
32
32
  let a = n();
33
33
  return P(e, t, N(i), "SUCCESS", r), a;
34
34
  } catch (n) {
35
- throw Ze(e, t, i, n, r), n;
35
+ throw Qe(e, t, i, n, r), n;
36
36
  }
37
37
  }
38
- async function $e(e, t, n, r) {
38
+ async function et(e, t, n, r) {
39
39
  let i = performance.now();
40
40
  try {
41
41
  let a = await n();
42
42
  return P(e, t, N(i), "SUCCESS", r), a;
43
43
  } catch (n) {
44
- throw Ze(e, t, i, n, r), n;
44
+ throw Qe(e, t, i, n, r), n;
45
45
  }
46
46
  }
47
47
  //#endregion
48
48
  //#region src/core/logger.ts
49
- var et = [i, ye];
50
- function tt(e, t) {
49
+ var tt = [i, ye];
50
+ function nt(e, t) {
51
51
  let n = t.guard("record.sanitize_failed", "The library could not read the error reason.", () => {
52
52
  if (!(e instanceof Error) && !Ee(e)) return;
53
53
  let t = Error(e.message);
@@ -57,10 +57,10 @@ function tt(e, t) {
57
57
  let r = t.guard("record.sanitize_failed", "The library could not convert the error reason to text.", () => String(e));
58
58
  return Error(r ?? typeof e);
59
59
  }
60
- function nt(e, t, n) {
60
+ function rt(e, t, n) {
61
61
  return n.guard("record.sanitize_failed", "The library could not read the error reason.", () => e instanceof Error ? e : t) ?? t;
62
62
  }
63
- function rt(e, t) {
63
+ function it(e, t) {
64
64
  if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" || typeof e == "symbol") return e;
65
65
  if (typeof e == "object" && e) return t.guard("record.sanitize_failed", "The library could not read the properties of the error reason.", () => {
66
66
  let t = e, n = Ee(e), r = {}, i = 0;
@@ -71,13 +71,13 @@ function rt(e, t) {
71
71
  return i === 0 ? void 0 : r;
72
72
  });
73
73
  }
74
- function it(e) {
75
- if (typeof e != "object" || !e || Array.isArray(e) || e instanceof Error) return !1;
74
+ function at(e) {
75
+ if (!Oe(e) || e instanceof Error) return !1;
76
76
  let t = Object.getPrototypeOf(e);
77
77
  return t === null || Object.getPrototypeOf(t) === null;
78
78
  }
79
- function at(e) {
80
- return et.some((t) => e === t || e.startsWith(`${t}.`)) ? "system" : "log";
79
+ function ot(e) {
80
+ return tt.some((t) => e === t || e.startsWith(`${t}.`)) ? "system" : "log";
81
81
  }
82
82
  function F(e, t) {
83
83
  return e === void 0 ? {} : t.guard("record.sanitize_failed", "The library could not read the payload.", () => ({ ...e })) ?? { "uiobs.sanitize_failed": !0 };
@@ -88,7 +88,7 @@ var I = class e {
88
88
  options;
89
89
  levelType;
90
90
  constructor(e, t, n = {}) {
91
- this.bind = e, this.namespace = t, this.options = n, this.levelType = at(t);
91
+ this.bind = e, this.namespace = t, this.options = n, this.levelType = ot(t);
92
92
  }
93
93
  child(t, n = {}) {
94
94
  return new e(this.bind, `${this.namespace}.${t}`, { scopedContext: {
@@ -135,8 +135,8 @@ var I = class e {
135
135
  };
136
136
  this.write("INFO", "metric", e, o, !0);
137
137
  };
138
- timeSync = (e, t, n) => Qe(this, e, t, n);
139
- timeAsync = (e, t, n) => $e(this, e, t, n);
138
+ timeSync = (e, t, n) => $e(this, e, t, n);
139
+ timeAsync = (e, t, n) => et(this, e, t, n);
140
140
  write(e, t, n, r, i = !1) {
141
141
  let a = this.bind();
142
142
  if (a.isDestroyed()) return;
@@ -163,12 +163,12 @@ var I = class e {
163
163
  if (i.isDestroyed()) return;
164
164
  let a = i.builder.isEnabled(e);
165
165
  if (!a && !this.mirrors(i, e)) return;
166
- let o = r === void 0 && (i.diagnostics.guard("record.sanitize_failed", "The library could not read the error slot.", () => it(n)) ?? !1), s = o ? n : r, c = o ? void 0 : n, l = c === void 0 ? void 0 : tt(c, i.diagnostics), u = l === void 0 ? void 0 : nt(c, l, i.diagnostics);
166
+ let o = r === void 0 && (i.diagnostics.guard("record.sanitize_failed", "The library could not read the error slot.", () => at(n)) ?? !1), s = o ? n : r, c = o ? void 0 : n, l = c === void 0 ? void 0 : nt(c, i.diagnostics), u = l === void 0 ? void 0 : rt(c, l, i.diagnostics);
167
167
  if (!a) {
168
168
  this.print(i, e, t, s, u, null);
169
169
  return;
170
170
  }
171
- let d = l ? rt(c, i.diagnostics) : void 0, { record: f, dropped: p } = i.builder.build({
171
+ let d = l ? it(c, i.diagnostics) : void 0, { record: f, dropped: p } = i.builder.build({
172
172
  level: e,
173
173
  type: this.levelType,
174
174
  body: t,
@@ -193,14 +193,14 @@ var I = class e {
193
193
  mirrors(e, t) {
194
194
  return e.config.enabled && e.console.accepts(t);
195
195
  }
196
- }, ot = {
196
+ }, st = {
197
197
  TRACE: "debug",
198
198
  DEBUG: "debug",
199
199
  INFO: "info",
200
200
  WARN: "warn",
201
201
  ERROR: "error",
202
202
  FATAL: "error"
203
- }, st = class {
203
+ }, ct = class {
204
204
  settings;
205
205
  diagnostics;
206
206
  limits;
@@ -214,50 +214,50 @@ var I = class e {
214
214
  return this.settings.level === null || !Object.hasOwn(O, this.settings.level) ? !1 : O[e] >= O[this.settings.level];
215
215
  }
216
216
  write(e, t, n, r, i) {
217
- if (!this.accepts(t) || typeof console > "u" || Ne()) return;
218
- let a = `%c[%s]%c[${t}]%c`, { styles: o } = this.settings, s = ot[t];
217
+ if (!this.accepts(t) || typeof console > "u" || Fe()) return;
218
+ let a = `%c[%s]%c[${t}]%c`, { styles: o } = this.settings, s = st[t];
219
219
  this.diagnostics.guard("handler.threw", `The library could not print to console.${s}.`, () => {
220
220
  let c = [];
221
- i !== void 0 && c.push(i), r !== void 0 && c.push(Fe(r, this.limits, this.diagnostics)), A(() => {
221
+ i !== void 0 && c.push(i), r !== void 0 && c.push(Le(r, this.limits, this.diagnostics)), A(() => {
222
222
  console[s](a, o.namespace, e, o[t], "", n, ...c);
223
223
  });
224
224
  });
225
225
  }
226
- }, ct = class {
226
+ }, lt = class {
227
227
  value = 0;
228
228
  next() {
229
229
  return ++this.value;
230
230
  }
231
- }, lt = /^[0-9a-f]{32}$/, ut = /^[0-9a-f]{16}$/, dt = /[1-9a-f]/;
232
- function ft(e) {
233
- return lt.test(e.traceId) && dt.test(e.traceId) && ut.test(e.spanId) && dt.test(e.spanId);
234
- }
235
- function pt() {
236
- return ze(16);
231
+ }, ut = /^[0-9a-f]{32}$/, dt = /^[0-9a-f]{16}$/, ft = /[1-9a-f]/;
232
+ function pt(e) {
233
+ return ut.test(e.traceId) && ft.test(e.traceId) && dt.test(e.spanId) && ft.test(e.spanId);
237
234
  }
238
235
  function mt() {
239
- return ze(8);
236
+ return Ve(16);
240
237
  }
241
238
  function ht() {
239
+ return Ve(8);
240
+ }
241
+ function gt() {
242
242
  return {
243
- traceId: pt(),
244
- spanId: mt(),
243
+ traceId: mt(),
244
+ spanId: ht(),
245
245
  traceFlags: 1,
246
246
  startedAt: Date.now()
247
247
  };
248
248
  }
249
- function gt(e) {
249
+ function _t(e) {
250
250
  return {
251
251
  traceId: e.traceId,
252
252
  spanId: e.spanId,
253
253
  traceFlags: e.traceFlags
254
254
  };
255
255
  }
256
- var _t = class {
256
+ var vt = class {
257
257
  diagnostics;
258
258
  maxAgeMs;
259
259
  load;
260
- ambient = ht();
260
+ ambient = gt();
261
261
  otel;
262
262
  constructor(e, t = be, n) {
263
263
  this.diagnostics = e, this.maxAgeMs = t, this.load = n;
@@ -271,7 +271,7 @@ var _t = class {
271
271
  }
272
272
  resolve() {
273
273
  let e = this.activeSpanContext();
274
- return e === void 0 ? (Date.now() - this.ambient.startedAt > this.maxAgeMs && this.rotate("maxAge"), gt(this.ambient)) : e;
274
+ return e === void 0 ? (Date.now() - this.ambient.startedAt > this.maxAgeMs && this.rotate("maxAge"), _t(this.ambient)) : e;
275
275
  }
276
276
  activeSpanContext() {
277
277
  let e = this.otel;
@@ -279,7 +279,7 @@ var _t = class {
279
279
  let t = e.trace.getActiveSpan();
280
280
  if (t === void 0) return;
281
281
  let n = t.spanContext();
282
- if (ft(n)) return {
282
+ if (pt(n)) return {
283
283
  traceId: n.traceId,
284
284
  spanId: n.spanId,
285
285
  traceFlags: n.traceFlags
@@ -287,7 +287,7 @@ var _t = class {
287
287
  });
288
288
  }
289
289
  rotate(e) {
290
- return this.ambient = ht(), gt(this.ambient);
290
+ return this.ambient = gt(), _t(this.ambient);
291
291
  }
292
292
  headers() {
293
293
  let e = {}, t = this.otel;
@@ -299,7 +299,7 @@ var _t = class {
299
299
  }
300
300
  return e;
301
301
  }
302
- }, vt = class {
302
+ }, yt = class {
303
303
  buffer;
304
304
  pointer = 0;
305
305
  filled = !1;
@@ -313,48 +313,45 @@ var _t = class {
313
313
  snapshot() {
314
314
  return (this.filled ? [...this.buffer.slice(this.pointer), ...this.buffer.slice(0, this.pointer)] : this.buffer.slice(0, this.pointer)).filter((e) => e !== void 0);
315
315
  }
316
- clear() {
317
- this.buffer = Array(this.capacity), this.pointer = 0, this.filled = !1;
318
- }
319
- }, yt = Object.keys(O), bt = ["gzip", "none"], xt = [
316
+ }, bt = Object.keys(O), xt = ["gzip", "none"], St = [
320
317
  "omit",
321
318
  "same-origin",
322
319
  "include"
323
- ], St = [
320
+ ], Ct = [
324
321
  "auto",
325
322
  "indexeddb",
326
323
  "localstorage",
327
324
  "memory",
328
325
  "none"
329
- ], Ct = ["storage", "memory"], wt = [
326
+ ], wt = ["storage", "memory"], Tt = [
330
327
  "auto",
331
328
  "sender",
332
329
  "forwarder",
333
330
  "off"
334
- ], Tt = [
331
+ ], Et = [
335
332
  "auto",
336
333
  "provider",
337
334
  "client"
338
- ], Et = [
335
+ ], Dt = [
339
336
  "auto",
340
337
  "context",
341
338
  "tab",
342
339
  "origin"
343
- ], Dt = [
340
+ ], Ot = [
344
341
  "error",
345
342
  "warn",
346
343
  "info",
347
344
  "log"
348
- ], Ot = ["limited", "until-delivered"], kt = {
345
+ ], kt = ["limited", "until-delivered"], At = {
349
346
  logFlushIntervalMs: [100, 6e4],
350
347
  logBatchSize: [1, 1e3],
351
348
  metricFlushIntervalMs: [100, 6e4],
352
349
  metricBatchSize: [1, 1e3]
353
- }, At = {
350
+ }, jt = {
354
351
  maxBatches: [1, 5e3],
355
352
  maxAgeMs: [6e4, 6048e5],
356
353
  maxAttempts: [1, 20]
357
- }, jt = {
354
+ }, Mt = {
358
355
  maxBodyChars: [256, 65536],
359
356
  maxAttributeChars: [256, 65536],
360
357
  maxAttributeCount: [1, 1024],
@@ -363,7 +360,7 @@ var _t = class {
363
360
  maxArrayLength: [1, 1e4],
364
361
  maxNodes: [100, 1e5],
365
362
  maxRecordBytes: [1024, g]
366
- }, Mt = [6e4, 864e5], Nt = [
363
+ }, Nt = [6e4, 864e5], Pt = [
367
364
  "errors",
368
365
  "rejections",
369
366
  "resourceErrors",
@@ -375,16 +372,16 @@ var _t = class {
375
372
  "webVitals",
376
373
  "longFrames",
377
374
  "fullUrls"
378
- ], Pt = "null", L = `a level name: ${R(yt)}`, Ft = `true, false or a list of ${R(Dt)}`, It = "a list of strings and RegExp patterns", Lt = "a list of origin URLs such as \"https://api.example\" and RegExp patterns", Rt = "a list of origin URLs such as \"https://app.example\". For a sandboxed frame, set bus.mode: \"sender\" in the frame", zt = "a list of strings";
375
+ ], Ft = "null", L = `a level name: ${R(bt)}`, It = `true, false or a list of ${R(Ot)}`, Lt = "a list of strings and RegExp patterns", Rt = "a list of origin URLs such as \"https://api.example\" and RegExp patterns", zt = "a list of origin URLs such as \"https://app.example\". For a sandboxed frame, set bus.mode: \"sender\" in the frame", Bt = "a list of strings";
379
376
  function R(e) {
380
377
  let t = e.map((e) => `"${e}"`);
381
378
  return `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
382
379
  }
383
- function Bt(e) {
380
+ function Vt(e) {
384
381
  return typeof e == "string" ? `"${e}"` : typeof e == "function" ? "a function" : typeof e == "object" && e ? "an object" : String(e);
385
382
  }
386
383
  function z(e, t, n, r, i) {
387
- e.report("config.invalid", `${t} must be ${n}. The value is ${Bt(r)}. The library keeps ${i}.`);
384
+ e.report("config.invalid", `${t} must be ${n}. The value is ${Vt(r)}. The library keeps ${i}.`);
388
385
  }
389
386
  function B(e, t, n, r, i) {
390
387
  if (t === void 0) return r;
@@ -394,24 +391,24 @@ function B(e, t, n, r, i) {
394
391
  function V(e, t, n, r) {
395
392
  return t === void 0 ? n : typeof t == "boolean" ? t : (z(r, e, "true or false", t, String(n)), n);
396
393
  }
397
- function Vt(e, t, n, r) {
394
+ function Ht(e, t, n, r) {
398
395
  return t === void 0 ? n : typeof t == "number" && Number.isFinite(t) && t >= 0 ? t : (z(r, e, "a finite number of 0 or more", t, String(n)), n);
399
396
  }
400
- function Ht(e, t, n, r, i) {
397
+ function Ut(e, t, n, r, i) {
401
398
  if (t === void 0) return r;
402
399
  let [a, o] = n;
403
400
  return typeof t == "number" && Number.isInteger(t) && t >= a && t <= o ? t : (z(i, e, `an integer from ${String(a)} to ${String(o)}`, t, String(r)), r);
404
401
  }
405
402
  function H(e, t, n, r, i) {
406
403
  let a = t ?? {}, o = Object.keys(r);
407
- return Object.fromEntries(o.map((t) => [t, Ht(`${e}.${t}`, a[t], r[t], n[t], i)]));
404
+ return Object.fromEntries(o.map((t) => [t, Ut(`${e}.${t}`, a[t], r[t], n[t], i)]));
408
405
  }
409
406
  function U(e) {
410
407
  if (typeof e != "string") return;
411
408
  let t = e.toUpperCase();
412
- return yt.find((e) => e === t);
409
+ return bt.find((e) => e === t);
413
410
  }
414
- function Ut(e, t, n, r) {
411
+ function Wt(e, t, n, r) {
415
412
  if (t === void 0) return n;
416
413
  let i = U(t);
417
414
  return i === void 0 ? (z(r, e, L, t, `"${n}"`), n) : i;
@@ -422,54 +419,54 @@ function W(e, t, n, r, i, a) {
422
419
  let o = [], s = t;
423
420
  for (let t of s) {
424
421
  let n = i(t);
425
- n === void 0 ? a.report("config.invalid", `The library ignores the ${e} entry ${Bt(t)}. ${e} must be ${r}.`) : o.push(n);
422
+ n === void 0 ? a.report("config.invalid", `The library ignores the ${e} entry ${Vt(t)}. ${e} must be ${r}.`) : o.push(n);
426
423
  }
427
424
  return o;
428
425
  }
429
- function Wt(e) {
430
- return typeof e == "string" ? e : void 0;
431
- }
432
426
  function Gt(e) {
433
- return typeof e == "string" || e instanceof RegExp ? e : void 0;
427
+ return typeof e == "string" ? e : void 0;
434
428
  }
435
429
  function Kt(e) {
436
- return Dt.find((t) => t === e);
430
+ return typeof e == "string" || e instanceof RegExp ? e : void 0;
437
431
  }
438
432
  function qt(e) {
433
+ return Ot.find((t) => t === e);
434
+ }
435
+ function Jt(e) {
439
436
  if (typeof e == "string") try {
440
437
  let { origin: t } = new URL(e);
441
- return t === Pt ? void 0 : t;
438
+ return t === Ft ? void 0 : t;
442
439
  } catch {
443
440
  return;
444
441
  }
445
442
  }
446
- function Jt(e) {
447
- return e instanceof RegExp ? e : qt(e);
448
- }
449
443
  function Yt(e) {
450
- return typeof e != "object" || !e || Array.isArray(e) ? !1 : Object.values(e).every((e) => typeof e == "string");
444
+ return e instanceof RegExp ? e : Jt(e);
451
445
  }
452
- function Xt(e, t, n) {
453
- if (e !== void 0) return typeof e == "function" || Yt(e) ? e : (z(n, "headers", "an object of strings or a function", e, "the headers in force"), t);
446
+ function Xt(e) {
447
+ return Oe(e) ? Object.values(e).every((e) => typeof e == "string") : !1;
454
448
  }
455
- function Zt(e) {
449
+ function Zt(e, t, n) {
450
+ if (e !== void 0) return typeof e == "function" || Xt(e) ? e : (z(n, "headers", "an object of strings or a function", e, "the headers in force"), t);
451
+ }
452
+ function Qt(e) {
456
453
  return typeof e != "object" || !e ? !1 : typeof Reflect.get(e, "serialize") == "function";
457
454
  }
458
- function Qt(e, t, n) {
459
- return e === void 0 ? t ?? "otlp" : e === "otlp" || e === "ecs" || Zt(e) ? e : (n.report("config.invalid", `serializer must be "${x}", "ecs" or an implementation. The library uses "${x}".`), x);
455
+ function $t(e, t, n) {
456
+ return e === void 0 ? t ?? "otlp" : e === "otlp" || e === "ecs" || Qt(e) ? e : (n.report("config.invalid", `serializer must be "${x}", "ecs" or an implementation. The library uses "${x}".`), x);
460
457
  }
461
- var $t = new Set(Object.keys(de));
462
- function en(e, t) {
458
+ var en = new Set(Object.keys(de));
459
+ function tn(e, t) {
463
460
  let n = {}, r = Object.entries(e ?? {});
464
- for (let [e, i] of r) $t.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.`);
461
+ for (let [e, i] of r) en.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.`);
465
462
  return n;
466
463
  }
467
- function tn(e, t, n) {
464
+ function nn(e, t, n) {
468
465
  if (e === void 0) return t ?? "DEBUG";
469
466
  let r = U(e);
470
467
  return r === void 0 ? (z(n, "console.level", L, e, "the console level in force"), t) : r;
471
468
  }
472
- function nn(t, n, r) {
469
+ function rn(t, n, r) {
473
470
  if (t === void 0) return n;
474
471
  if (t === !1) return {
475
472
  level: null,
@@ -487,14 +484,14 @@ function nn(t, n, r) {
487
484
  };
488
485
  }
489
486
  return typeof t != "object" || !t ? (r.report("config.invalid", "console must be a boolean, a level or an object. The console settings in force stay."), n) : {
490
- level: tn(t.level, n.level, r),
487
+ level: nn(t.level, n.level, r),
491
488
  styles: {
492
489
  ...n.styles,
493
- ...en(t.styles, r)
490
+ ...tn(t.styles, r)
494
491
  }
495
492
  };
496
493
  }
497
- function rn(e, t, n) {
494
+ function an(e, t, n) {
498
495
  let r = e ?? {};
499
496
  return {
500
497
  ...t,
@@ -503,48 +500,48 @@ function rn(e, t, n) {
503
500
  ...t.rates,
504
501
  ...r.rates
505
502
  },
506
- alwaysSampleTypes: W("sampling.alwaysSampleTypes", r.alwaysSampleTypes, t.alwaysSampleTypes, zt, Wt, n),
503
+ alwaysSampleTypes: W("sampling.alwaysSampleTypes", r.alwaysSampleTypes, t.alwaysSampleTypes, Bt, Gt, n),
507
504
  remote: V("sampling.remote", r.remote, t.remote, n)
508
505
  };
509
506
  }
510
- function an(e, t, n) {
511
- let r = e ?? {};
512
- return {
513
- mode: B("bus.mode", r.mode, wt, t.mode, n),
514
- trustedOrigins: W("bus.trustedOrigins", r.trustedOrigins, t.trustedOrigins, Rt, qt, n),
515
- openFinRole: B("bus.openFinRole", r.openFinRole, Tt, t.openFinRole, n)
516
- };
517
- }
518
507
  function on(e, t, n) {
519
508
  let r = e ?? {};
520
509
  return {
521
- scope: B("journey.scope", r.scope, Et, t.scope, n),
522
- maxAgeMs: Ht("journey.maxAgeMs", r.maxAgeMs, Mt, t.maxAgeMs, n)
510
+ mode: B("bus.mode", r.mode, Tt, t.mode, n),
511
+ trustedOrigins: W("bus.trustedOrigins", r.trustedOrigins, t.trustedOrigins, zt, Jt, n),
512
+ openFinRole: B("bus.openFinRole", r.openFinRole, Et, t.openFinRole, n)
523
513
  };
524
514
  }
525
515
  function sn(e, t, n) {
526
516
  let r = e ?? {};
527
517
  return {
528
- mode: B("retention.mode", r.mode, Ot, t.mode, n),
529
- ...H("retention", r, t, At, n)
518
+ scope: B("journey.scope", r.scope, Dt, t.scope, n),
519
+ maxAgeMs: Ut("journey.maxAgeMs", r.maxAgeMs, Nt, t.maxAgeMs, n)
530
520
  };
531
521
  }
532
522
  function cn(e, t, n) {
533
- return e === void 0 ? t : typeof e == "boolean" ? e : Array.isArray(e) ? W("capture.console", e, [], Ft, Kt, n) : (z(n, "capture.console", Ft, e, "the value in force"), t);
523
+ let r = e ?? {};
524
+ return {
525
+ mode: B("retention.mode", r.mode, kt, t.mode, n),
526
+ ...H("retention", r, t, jt, n)
527
+ };
534
528
  }
535
529
  function ln(e, t, n) {
530
+ return e === void 0 ? t : typeof e == "boolean" ? e : Array.isArray(e) ? W("capture.console", e, [], It, qt, n) : (z(n, "capture.console", It, e, "the value in force"), t);
531
+ }
532
+ function un(e, t, n) {
536
533
  let r = e ?? {}, i = {
537
534
  ...t,
538
535
  ...r,
539
- console: cn(r.console, t.console, n),
540
- longFrameThresholdMs: Vt("capture.longFrameThresholdMs", r.longFrameThresholdMs, t.longFrameThresholdMs, n),
541
- ignoreUrls: W("capture.ignoreUrls", r.ignoreUrls, t.ignoreUrls, It, Gt, n),
542
- propagateTraceHeaderTo: W("capture.propagateTraceHeaderTo", r.propagateTraceHeaderTo, t.propagateTraceHeaderTo, Lt, Jt, n)
536
+ console: ln(r.console, t.console, n),
537
+ longFrameThresholdMs: Ht("capture.longFrameThresholdMs", r.longFrameThresholdMs, t.longFrameThresholdMs, n),
538
+ ignoreUrls: W("capture.ignoreUrls", r.ignoreUrls, t.ignoreUrls, Lt, Kt, n),
539
+ propagateTraceHeaderTo: W("capture.propagateTraceHeaderTo", r.propagateTraceHeaderTo, t.propagateTraceHeaderTo, Rt, Yt, n)
543
540
  };
544
- for (let e of Nt) i[e] = V(`capture.${e}`, r[e], t[e], n);
541
+ for (let e of Pt) i[e] = V(`capture.${e}`, r[e], t[e], n);
545
542
  return i;
546
543
  }
547
- function un(e, t, n, r) {
544
+ function dn(e, t, n, r) {
548
545
  let i = t;
549
546
  if (typeof e == "string" && e !== "") try {
550
547
  new URL(e), i = e;
@@ -554,29 +551,29 @@ function un(e, t, n, r) {
554
551
  else e === "" ? i = "" : e !== void 0 && z(r, "metricsEndpoint", "a URL string", e, "the value in force");
555
552
  return i !== "" && n !== "otlp" ? (r.report("config.invalid", `metricsEndpoint needs serializer "${x}". The library sends metric records as log records.`), "") : i;
556
553
  }
557
- function dn(e, t, n) {
554
+ function fn(e, t, n) {
558
555
  let i = n ?? a, o = {
559
556
  ...i,
560
557
  ...e,
561
558
  endpoint: e.endpoint === void 0 ? i.endpoint : e.endpoint,
562
559
  enabled: V("enabled", e.enabled, i.enabled, t),
563
- minLevel: Ut("minLevel", e.minLevel, i.minLevel, t),
564
- compression: B("compression", e.compression, bt, i.compression, t),
565
- credentials: B("credentials", e.credentials, xt, i.credentials, t),
566
- headers: "headers" in e ? Xt(e.headers, i.headers, t) : i.headers,
567
- storage: B("storage", e.storage, St, i.storage, t),
568
- identity: B("identity", e.identity, Ct, i.identity, t),
569
- serializer: Qt(e.serializer, n?.serializer, t),
570
- console: nn(e.console, i.console, t),
571
- sampling: rn(e.sampling, i.sampling, t),
572
- bus: an(e.bus, i.bus, t),
573
- batching: H("batching", e.batching, i.batching, kt, t),
574
- retention: sn(e.retention, i.retention, t),
575
- limits: H("limits", e.limits, i.limits, jt, t),
576
- journey: on(e.journey, i.journey, t),
577
- capture: ln(e.capture, i.capture, t)
560
+ minLevel: Wt("minLevel", e.minLevel, i.minLevel, t),
561
+ compression: B("compression", e.compression, xt, i.compression, t),
562
+ credentials: B("credentials", e.credentials, St, i.credentials, t),
563
+ headers: "headers" in e ? Zt(e.headers, i.headers, t) : i.headers,
564
+ storage: B("storage", e.storage, Ct, i.storage, t),
565
+ identity: B("identity", e.identity, wt, i.identity, t),
566
+ serializer: $t(e.serializer, n?.serializer, t),
567
+ console: rn(e.console, i.console, t),
568
+ sampling: an(e.sampling, i.sampling, t),
569
+ bus: on(e.bus, i.bus, t),
570
+ batching: H("batching", e.batching, i.batching, At, t),
571
+ retention: cn(e.retention, i.retention, t),
572
+ limits: H("limits", e.limits, i.limits, Mt, t),
573
+ journey: sn(e.journey, i.journey, t),
574
+ capture: un(e.capture, i.capture, t)
578
575
  };
579
- if (o.metricsEndpoint = un(e.metricsEndpoint, i.metricsEndpoint, o.serializer, t), o.transport !== void 0 && typeof o.transport != "function" && (t.report("config.invalid", "transport must be a function. The library ignores the value."), o.transport = i.transport), o.onDrop !== void 0 && typeof o.onDrop != "function" && (t.report("config.invalid", "onDrop must be a function. The library ignores the value."), o.onDrop = i.onDrop), o.transportOnExit !== void 0 && typeof o.transportOnExit != "function" && (t.report("config.invalid", "transportOnExit must be a function. The library ignores the value."), o.transportOnExit = i.transportOnExit), o.endpoint === "") o.transport === void 0 && t.report("config.invalid", "endpoint is missing. The library drops each record. Set endpoint: null for console-only mode.");
576
+ if (o.metricsEndpoint = dn(e.metricsEndpoint, i.metricsEndpoint, o.serializer, t), o.transport !== void 0 && typeof o.transport != "function" && (t.report("config.invalid", "transport must be a function. The library ignores the value."), o.transport = i.transport), o.onDrop !== void 0 && typeof o.onDrop != "function" && (t.report("config.invalid", "onDrop must be a function. The library ignores the value."), o.onDrop = i.onDrop), o.transportOnExit !== void 0 && typeof o.transportOnExit != "function" && (t.report("config.invalid", "transportOnExit must be a function. The library ignores the value."), o.transportOnExit = i.transportOnExit), o.endpoint === "") o.transport === void 0 && t.report("config.invalid", "endpoint is missing. The library drops each record. Set endpoint: null for console-only mode.");
580
577
  else if (o.endpoint !== null) try {
581
578
  new URL(o.endpoint);
582
579
  } catch (e) {
@@ -591,9 +588,9 @@ function dn(e, t, n) {
591
588
  for (let [e, n] of l) (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.`), o.sampling.rates[e] = 1);
592
589
  o.capture.ignoreUrls = o.capture.ignoreUrls.filter((e) => e !== n?.endpoint && e !== n?.metricsEndpoint);
593
590
  for (let e of [o.endpoint, o.metricsEndpoint]) e && !o.capture.ignoreUrls.includes(e) && (o.capture.ignoreUrls = [...o.capture.ignoreUrls, e]);
594
- return fn(e, t), o;
591
+ return pn(e, t), o;
595
592
  }
596
- function fn(e, t) {
593
+ function pn(e, t) {
597
594
  let n = /* @__PURE__ */ new Set([...Object.keys(a), ...xe]);
598
595
  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.`);
599
596
  for (let n of C) {
@@ -603,13 +600,13 @@ function fn(e, t) {
603
600
  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.`);
604
601
  }
605
602
  }
606
- function pn(e, t) {
603
+ function mn(e, t) {
607
604
  for (let n of Object.keys(t)) C.includes(n) || Object.assign(e, { [n]: t[n] });
608
605
  for (let n of C) Object.assign(e[n], t[n]);
609
606
  }
610
607
  //#endregion
611
608
  //#region src/core/context.ts
612
- var mn = class {
609
+ var hn = class {
613
610
  map = /* @__PURE__ */ new Map();
614
611
  set(e, t) {
615
612
  this.map.set(e, t);
@@ -617,19 +614,13 @@ var mn = class {
617
614
  setMany(e) {
618
615
  for (let [t, n] of Object.entries(e)) this.map.set(t, n);
619
616
  }
620
- get(e) {
621
- return this.map.get(e);
622
- }
623
617
  remove(e) {
624
618
  this.map.delete(e);
625
619
  }
626
- clear() {
627
- this.map.clear();
628
- }
629
620
  getAll() {
630
621
  return Object.fromEntries(this.map);
631
622
  }
632
- }, hn = class {
623
+ }, gn = class {
633
624
  handler;
634
625
  throttleMs;
635
626
  counters = /* @__PURE__ */ new Map();
@@ -685,16 +676,13 @@ var mn = class {
685
676
  snapshot() {
686
677
  return Object.fromEntries(this.counters);
687
678
  }
688
- reset() {
689
- this.counters.clear(), this.lastEmitted.clear();
690
- }
691
679
  };
692
680
  //#endregion
693
681
  //#region src/core/drops.ts
694
682
  function G(e, t) {
695
683
  e.length < 20 && !e.includes(t) && e.push(t);
696
684
  }
697
- var gn = class {
685
+ var _n = class {
698
686
  config;
699
687
  diagnostics;
700
688
  pending = /* @__PURE__ */ new Map();
@@ -715,7 +703,7 @@ var gn = class {
715
703
  }, this.pending.set(e, r)), r.records += t.length;
716
704
  for (let e of n) G(r.batchIds, e);
717
705
  for (let e of t) {
718
- let t = Ke(e, E);
706
+ let t = Je(e, E);
719
707
  typeof t == "string" && G(r.journeyIds, t);
720
708
  let n = M(e) ? e.body : void 0;
721
709
  typeof n == "string" && G(r.actions, n);
@@ -732,7 +720,7 @@ var gn = class {
732
720
  if (t) {
733
721
  this.reporting = !0;
734
722
  for (let n of e) this.diagnostics.guard("handler.threw", "The onDrop hook threw an error.", () => {
735
- qe(() => {
723
+ Ye(() => {
736
724
  A(() => {
737
725
  t(n);
738
726
  });
@@ -741,7 +729,7 @@ var gn = class {
741
729
  this.reporting = !1;
742
730
  }
743
731
  }
744
- }, _n = class {
732
+ }, vn = class {
745
733
  onDrop;
746
734
  held = [];
747
735
  actions = 0;
@@ -767,7 +755,7 @@ var gn = class {
767
755
  let e = this.held;
768
756
  return this.held = [], this.actions = 0, e;
769
757
  }
770
- }, vn = "overflow", yn = /* @__PURE__ */ new Set([
758
+ }, yn = "overflow", bn = /* @__PURE__ */ new Set([
771
759
  b,
772
760
  D,
773
761
  w,
@@ -776,24 +764,24 @@ var gn = class {
776
764
  y,
777
765
  fe
778
766
  ]);
779
- function bn(e = {}) {
767
+ function xn(e = {}) {
780
768
  let t = {};
781
769
  for (let n of Object.keys(e).sort()) {
782
- if (n.startsWith("metric.") || yn.has(n)) continue;
770
+ if (n.startsWith("metric.") || bn.has(n)) continue;
783
771
  let r = e[n];
784
772
  (typeof r == "string" || typeof r == "boolean" || typeof r == "number" && Number.isFinite(r)) && (t[n] = r);
785
773
  }
786
774
  return t;
787
775
  }
788
- function xn(e) {
776
+ function Sn(e) {
789
777
  if (!Array.isArray(e)) return null;
790
778
  let t = Math.min(e.length, 51);
791
779
  return Array.from({ length: t }, (t, n) => e[n]);
792
780
  }
793
- function Sn(e) {
781
+ function Cn(e) {
794
782
  return Array.isArray(e) && e.length <= 50 && e.every((t, n) => typeof t == "number" && Number.isFinite(t) && (n === 0 || t > e[n - 1]));
795
783
  }
796
- function Cn(e, t, n) {
784
+ function wn(e, t, n) {
797
785
  let r = {
798
786
  "metric.name": e.name,
799
787
  "metric.unit": e.unit,
@@ -811,7 +799,7 @@ function Cn(e, t, n) {
811
799
  [k.buckets]: t.buckets
812
800
  };
813
801
  }
814
- var wn = class {
802
+ var Tn = class {
815
803
  intervalMs;
816
804
  emit;
817
805
  diagnostics;
@@ -824,19 +812,19 @@ var wn = class {
824
812
  record(e, t, n) {
825
813
  !Number.isFinite(t) || e.kind === "counter" && t < 0 ? this.diagnostics.report("record.dropped_malformed", `The value of the metric ${e.name} is not valid. The library dropped it.`, { "metric.name": e.name }) : this.diagnostics.guard("record.sanitize_failed", `The library could not read the attributes of the metric ${e.name}.`, () => {
826
814
  let r = this.instrumentOf(e);
827
- r && (this.add(r, t, bn(n)), this.arm());
815
+ r && (this.add(r, t, xn(n)), this.arm());
828
816
  });
829
817
  }
830
818
  collect() {
831
819
  this.timer !== null && (clearTimeout(this.timer), this.timer = null);
832
820
  let e = `${String(this.startedAt)}000000`, t = [...this.instruments.values()];
833
821
  this.instruments.clear();
834
- for (let { def: n, series: r } of t) for (let t of r.values()) this.emit(n.name, t.attributes, Cn(n, t, e));
822
+ for (let { def: n, series: r } of t) for (let t of r.values()) this.emit(n.name, t.attributes, wn(n, t, e));
835
823
  }
836
824
  instrumentOf(e) {
837
825
  let t = this.instruments.get(e.name);
838
826
  if (t) return t.def.kind === e.kind ? t : (this.diagnostics.report("record.dropped_malformed", `The metric ${e.name} is a counter and a histogram. The library dropped the value.`, { "metric.name": e.name }), null);
839
- let n = xn(e.boundaries), r = Sn(n);
827
+ let n = Sn(e.boundaries), r = Cn(n);
840
828
  e.kind === "histogram" && !r && this.diagnostics.report("config.invalid", `The boundaries of the metric ${e.name} must be at most 50 finite numbers in ascending order. The library uses the default boundaries.`);
841
829
  let i = {
842
830
  def: {
@@ -849,7 +837,7 @@ var wn = class {
849
837
  }
850
838
  add(e, t, n) {
851
839
  let r = JSON.stringify(n), i = e.series.get(r), a = n;
852
- if (!i && e.series.size >= 100 && (r = vn, i = e.series.get(r), a = { [oe]: !0 }), !i) {
840
+ if (!i && e.series.size >= 100 && (r = yn, i = e.series.get(r), a = { [oe]: !0 }), !i) {
853
841
  let n = e.def.kind === "histogram" ? e.def.boundaries.length + 1 : 0, o = Array(n).fill(0);
854
842
  i = {
855
843
  attributes: a,
@@ -868,9 +856,9 @@ var wn = class {
868
856
  arm() {
869
857
  this.timer === null && (this.startedAt = Date.now(), this.timer = setTimeout(() => {
870
858
  this.collect();
871
- }, this.intervalMs()), Je(this.timer));
859
+ }, this.intervalMs()), ke(this.timer));
872
860
  }
873
- }, Tn = "error.", En = [
861
+ }, En = "error.", Dn = [
874
862
  T,
875
863
  E,
876
864
  y
@@ -878,7 +866,7 @@ var wn = class {
878
866
  function K(e) {
879
867
  return e;
880
868
  }
881
- var Dn = class {
869
+ var On = class {
882
870
  deps;
883
871
  resourceCache = null;
884
872
  constructor(e) {
@@ -901,7 +889,7 @@ var Dn = class {
901
889
  dropped: "level"
902
890
  };
903
891
  let c = r.resolve(), l = i.current();
904
- if (!Me({
892
+ if (!Pe({
905
893
  level: e.level,
906
894
  type: e.type,
907
895
  namespace: e.namespace,
@@ -912,7 +900,7 @@ var Dn = class {
912
900
  record: null,
913
901
  dropped: "sampling"
914
902
  };
915
- let u = a.next(), d = Ge(n), f = t.capture.fullUrls ? d : We(d), p, m = 0;
903
+ let u = a.next(), d = qe(n), f = t.capture.fullUrls ? d : Ge(d), p, m = 0;
916
904
  try {
917
905
  let t = j(this.deps.context.getAll(), o, n), r = j(e.scoped ?? {}, o, n), i = j(e.payload ?? {}, o, n);
918
906
  m = t.bytes + r.bytes + i.bytes, p = {
@@ -924,10 +912,10 @@ var Dn = class {
924
912
  n.report("record.sanitize_failed", "The library could not sanitize the attributes.", void 0, e), p = { [me]: !0 };
925
913
  }
926
914
  Object.assign(p, e.fixed), p[b] = e.type, p[D] = u, p[w] = e.namespace, p[T] = f, l && (p[E] = l.id, p[y] = l.name, l.parentId !== void 0 && (p[fe] = l.parentId));
927
- let h = Pe(e.body, o.maxBodyChars);
915
+ let h = Ie(e.body, o.maxBodyChars);
928
916
  h !== e.body && n.count("record.truncated");
929
917
  let g = {
930
- timeUnixNano: je(),
918
+ timeUnixNano: Ne(),
931
919
  traceId: c.traceId,
932
920
  spanId: c.spanId,
933
921
  traceFlags: c.traceFlags,
@@ -952,14 +940,14 @@ var Dn = class {
952
940
  dropped: "redact"
953
941
  };
954
942
  let r = t ?? g;
955
- if (!Oe(r)) return r === g ? (n.report("record.dropped_malformed", "The redact hook changed the record to a shape that is not a record. The library dropped it."), {
943
+ if (!Ae(r)) return r === g ? (n.report("record.dropped_malformed", "The redact hook changed the record to a shape that is not a record. The library dropped it."), {
956
944
  record: null,
957
945
  dropped: "malformed"
958
946
  }) : (n.report("record.dropped_by_redact", "The redact hook returned a value that is not a record. The library dropped the record."), {
959
947
  record: null,
960
948
  dropped: "redact"
961
949
  });
962
- if (ke(r.severityText)) {
950
+ if (je(r.severityText)) {
963
951
  if (r !== g) {
964
952
  let t = j(r.attributes, o, n);
965
953
  g = {
@@ -985,8 +973,8 @@ var Dn = class {
985
973
  [le]: !0,
986
974
  [ve]: m
987
975
  };
988
- for (let e of En) e in g.attributes && (t[e] = g.attributes[e]);
989
- for (let [e, n] of Object.entries(g.attributes)) e.startsWith(Tn) && (t[e] = n);
976
+ for (let e of Dn) e in g.attributes && (t[e] = g.attributes[e]);
977
+ for (let [e, n] of Object.entries(g.attributes)) e.startsWith(En) && (t[e] = n);
990
978
  let r = j(t, o, n).bytes;
991
979
  r > o.maxRecordBytes && "error.data" in t && (Reflect.deleteProperty(t, ge), r = j(t, o, n).bytes);
992
980
  let i = g.attributes[v];
@@ -1017,15 +1005,15 @@ var Dn = class {
1017
1005
  ...r.openfinName === void 0 ? {} : { [we]: r.openfinName }
1018
1006
  }, this.resourceCache;
1019
1007
  }
1020
- }, On = {
1021
- errors: async () => (await import("./errors-BGs5NOrw.js")).ErrorCapture,
1022
- network: async () => (await import("./network-CMnEvGJB.js")).NetworkCapture,
1023
- interactions: async () => (await import("./interactions-B8zjCjga.js")).InteractionCapture,
1008
+ }, kn = {
1009
+ errors: async () => (await import("./errors-DCZWcHkd.js")).ErrorCapture,
1010
+ network: async () => (await import("./network--GoE7_Or.js")).NetworkCapture,
1011
+ interactions: async () => (await import("./interactions-BLH_tX87.js")).InteractionCapture,
1024
1012
  webVitals: async () => (await import("./web-vitals-Bflr5jSA.js")).WebVitalsCapture,
1025
- longFrames: async () => (await import("./long-frames-B0tKuChx.js")).LongFrameCapture,
1026
- console: async () => (await import("./console-B3vGRW5p.js")).ConsoleCapture
1027
- }, q = Symbol.for(re), J = Symbol.for(m), kn = ["batching", "retention"];
1028
- function An(e) {
1013
+ longFrames: async () => (await import("./long-frames-DD_Um9_4.js")).LongFrameCapture,
1014
+ console: async () => (await import("./console-Dv5GfaNn.js")).ConsoleCapture
1015
+ }, q = Symbol.for(re), J = Symbol.for(m), An = ["batching", "retention"];
1016
+ function Y(e) {
1029
1017
  return JSON.stringify({
1030
1018
  ...e,
1031
1019
  webVitalsLoader: e.webVitalsLoader !== void 0,
@@ -1033,7 +1021,7 @@ function An(e) {
1033
1021
  propagateTraceHeaderTo: e.propagateTraceHeaderTo.map(String)
1034
1022
  });
1035
1023
  }
1036
- function Y(e) {
1024
+ function jn(e) {
1037
1025
  return {
1038
1026
  ...e,
1039
1027
  endpoint: null,
@@ -1059,10 +1047,10 @@ var Z = class e {
1059
1047
  stores;
1060
1048
  identityBuiltAs;
1061
1049
  sessionTouch;
1062
- context = new mn();
1050
+ context = new hn();
1063
1051
  breadcrumbs;
1064
1052
  tracing;
1065
- sequence = new ct();
1053
+ sequence = new lt();
1066
1054
  journey;
1067
1055
  builder;
1068
1056
  remote = { sampling: null };
@@ -1075,7 +1063,7 @@ var Z = class e {
1075
1063
  storageBuiltAs;
1076
1064
  sender;
1077
1065
  senderLoad;
1078
- pendingRecords = new _n((e) => {
1066
+ pendingRecords = new vn((e) => {
1079
1067
  this.dropHeld(e);
1080
1068
  });
1081
1069
  captures = [];
@@ -1085,7 +1073,7 @@ var Z = class e {
1085
1073
  navigationTiming: !1,
1086
1074
  longFrames: !1
1087
1075
  };
1088
- bootBuffer = new _n((e) => {
1076
+ bootBuffer = new vn((e) => {
1089
1077
  this.dropHeld(e);
1090
1078
  });
1091
1079
  forwardBuffer = [];
@@ -1099,12 +1087,12 @@ var Z = class e {
1099
1087
  journeyOptions;
1100
1088
  tunablesLocked = !0;
1101
1089
  constructor(e, t = !1) {
1102
- this.degraded = t, this.diagnostics = new hn(e.onDiagnostic), this.platform = Ue(this.diagnostics), this.config = dn(e, this.diagnostics), this.identityBuiltAs = this.config.identity, this.stores = this.identityBuiltAs === "memory" ? Be() : He, this.identity = Ve(this.diagnostics, this.stores), this.sessionTouch = new Re(this.diagnostics, this.stores), this.breadcrumbs = new vt(50), this.tracing = new _t(this.diagnostics, void 0, this.config.otelLoader), this.tracing.loadOtel(), this.limits = { ...this.config.limits }, this.console = new st(this.config.console, this.diagnostics, this.limits), this.drops = new gn(this.config, this.diagnostics), this.journeyOptions = {
1103
- ...Xe,
1090
+ this.degraded = t, this.diagnostics = new gn(e.onDiagnostic), this.platform = Ke(this.diagnostics), this.config = fn(e, this.diagnostics), this.identityBuiltAs = this.config.identity, this.stores = this.identityBuiltAs === "memory" ? He() : We, this.identity = Ue(this.diagnostics, this.stores), this.sessionTouch = new Be(this.diagnostics, this.stores), this.breadcrumbs = new yt(50), this.tracing = new vt(this.diagnostics, void 0, this.config.otelLoader), this.tracing.loadOtel(), this.limits = { ...this.config.limits }, this.console = new ct(this.config.console, this.diagnostics, this.limits), this.drops = new _n(this.config, this.diagnostics), this.journeyOptions = {
1091
+ ...Ze,
1104
1092
  maxAgeMs: this.config.journey.maxAgeMs
1105
- }, this.journey = new Ye(this.journeyOptions, this.diagnostics, this.identity.contextId, (e) => {
1093
+ }, this.journey = new Xe(this.journeyOptions, this.diagnostics, this.identity.contextId, (e) => {
1106
1094
  this.bus?.broadcastJourney(e);
1107
- }, this.stores), this.builder = new Dn({
1095
+ }, this.stores), this.builder = new On({
1108
1096
  remote: this.remote,
1109
1097
  config: this.config,
1110
1098
  limits: this.limits,
@@ -1115,7 +1103,7 @@ var Z = class e {
1115
1103
  sequence: this.sequence,
1116
1104
  identity: this.identity,
1117
1105
  platform: this.platform
1118
- }), this.meter = new wn(() => this.config.batching.metricFlushIntervalMs, (e, t, n) => {
1106
+ }), this.meter = new Tn(() => this.config.batching.metricFlushIntervalMs, (e, t, n) => {
1119
1107
  this.emitPoint(e, t, n);
1120
1108
  }, this.diagnostics);
1121
1109
  }
@@ -1161,7 +1149,7 @@ var Z = class e {
1161
1149
  }
1162
1150
  static configure(t, n = !1) {
1163
1151
  let r = e.local;
1164
- if (r && !r.destroyed) return r.reconfigure(Y(t)), r;
1152
+ if (r && !r.destroyed) return r.reconfigure(jn(t)), r;
1165
1153
  e.local = null;
1166
1154
  let i = e.pinned();
1167
1155
  if (i) {
@@ -1172,7 +1160,7 @@ var Z = class e {
1172
1160
  return a.tunablesLocked = !n, globalThis[q] = a, Reflect.deleteProperty(globalThis, J), a.init(), a;
1173
1161
  }
1174
1162
  static startDegraded(t, n) {
1175
- let r = new e(Y(t), !0);
1163
+ let r = new e(jn(t), !0);
1176
1164
  e.local = r;
1177
1165
  let i = typeof n == "string" ? n : "before 0.9.0";
1178
1166
  return r.diagnostics.report("runtime.version_mismatch", `Another copy of the library, version ${i}, owns the page runtime. This copy, version ${S}, runs in console-only mode and installs no capture. Load one version of the library on the page.`, {
@@ -1181,11 +1169,11 @@ var Z = class e {
1181
1169
  }), r.init(), r;
1182
1170
  }
1183
1171
  reconfigure(e) {
1184
- let t = this.keepDestination(e), n = An(this.config.capture), r = dn(t, this.diagnostics, this.config);
1185
- this.keepStartupTunables(r), pn(this.config, r), this.diagnostics.setHandler(this.config.onDiagnostic), this.builder.invalidateResource(), this.console.update(this.config.console), this.keepBuiltStorage(), this.keepBuiltIdentity(), An(this.config.capture) !== n && this.installCaptures(), this.roleResolved && this.syncSender(), this.diagnostics.report("config.reconfigured", "A later configure() call updated the runtime.");
1172
+ let t = this.keepDestination(e), n = Y(this.config.capture), r = fn(t, this.diagnostics, this.config);
1173
+ this.keepStartupTunables(r), mn(this.config, r), this.diagnostics.setHandler(this.config.onDiagnostic), this.builder.invalidateResource(), this.console.update(this.config.console), this.keepBuiltStorage(), this.keepBuiltIdentity(), Y(this.config.capture) !== n && this.installCaptures(), this.roleResolved && this.syncSender(), this.diagnostics.report("config.reconfigured", "A later configure() call updated the runtime.");
1186
1174
  }
1187
1175
  keepStartupTunables(e) {
1188
- if (this.senderLoad !== void 0 && this.keepSections(e, kn), !this.tunablesLocked) {
1176
+ if (this.senderLoad !== void 0 && this.keepSections(e, An), !this.tunablesLocked) {
1189
1177
  this.tunablesLocked = !0, Object.assign(this.limits, e.limits), this.journeyOptions.maxAgeMs = e.journey.maxAgeMs;
1190
1178
  return;
1191
1179
  }
@@ -1243,7 +1231,7 @@ var Z = class e {
1243
1231
  }
1244
1232
  async buildBus() {
1245
1233
  try {
1246
- let { Bus: e } = await import("./bus-DrixwdiX.js");
1234
+ let { Bus: e } = await import("./bus-C6RwKzPW.js");
1247
1235
  if (this.destroyed) return null;
1248
1236
  let t = new e(this.config, this.diagnostics, this.platform, this.identity.contextId, this.identity.tabId, {
1249
1237
  onRecords: (e) => {
@@ -1278,7 +1266,7 @@ var Z = class e {
1278
1266
  async buildSender() {
1279
1267
  this.storageBuiltAs = this.config.storage;
1280
1268
  try {
1281
- let { Sender: e } = await import("./sender--0_VzPbN.js"), t = this.destroyed ? null : await e.create({
1269
+ let { Sender: e } = await import("./sender-BUBWLn5i.js"), t = this.destroyed ? null : await e.create({
1282
1270
  config: this.config,
1283
1271
  diagnostics: this.diagnostics,
1284
1272
  onGap: this.reportGap,
@@ -1328,7 +1316,7 @@ var Z = class e {
1328
1316
  this.captures.length = 0;
1329
1317
  }
1330
1318
  loadCapture(e) {
1331
- return this.diagnostics.guardAsync("capture.install_failed", `The library could not load the ${e} capture.`, On[e]);
1319
+ return this.diagnostics.guardAsync("capture.install_failed", `The library could not load the ${e} capture.`, kn[e]);
1332
1320
  }
1333
1321
  registerWorker(e) {
1334
1322
  this.destroyed || this.constructBus().then((t) => {
@@ -1366,7 +1354,7 @@ var Z = class e {
1366
1354
  }
1367
1355
  ingestForwarded(e) {
1368
1356
  if (!Array.isArray(e)) this.diagnostics.count("record.dropped_malformed");
1369
- else for (let t of e) Oe(t) ? Ae(t, this.config, this.remote.sampling?.current() ?? null) ? this.deliver(t) : this.diagnostics.count("record.dropped_by_sampling") : this.diagnostics.count("record.dropped_malformed");
1357
+ else for (let t of e) Ae(t) ? Me(t, this.config, this.remote.sampling?.current() ?? null) ? this.deliver(t) : this.diagnostics.count("record.dropped_by_sampling") : this.diagnostics.count("record.dropped_malformed");
1370
1358
  }
1371
1359
  releaseBootBuffer() {
1372
1360
  let e = this.bootBuffer.take(), t = this.journey.current();
@@ -1385,11 +1373,11 @@ var Z = class e {
1385
1373
  }));
1386
1374
  };
1387
1375
  regenerateTabId() {
1388
- let e = Le(this.diagnostics);
1376
+ let e = ze(this.diagnostics);
1389
1377
  this.diagnostics.report("bus.role_resolved", "Another context uses this tab id. A duplicated tab is the usual cause. The library makes a new tab id.", {
1390
1378
  was: this.identity.tabId,
1391
1379
  now: e
1392
- }), this.identity.tabId = e, Ie(e, this.diagnostics, this.stores), this.builder.invalidateResource();
1380
+ }), this.identity.tabId = e, Re(e, this.diagnostics, this.stores), this.builder.invalidateResource();
1393
1381
  }
1394
1382
  async queueDepth() {
1395
1383
  return await this.senderLoad, await this.sender?.queueDepth() ?? 0;
@@ -1400,7 +1388,7 @@ var Z = class e {
1400
1388
  };
1401
1389
  //#endregion
1402
1390
  //#region src/transport/memory-transport.ts
1403
- function jn() {
1391
+ function Mn() {
1404
1392
  let e = [], t = [], n = { status: 200 };
1405
1393
  return {
1406
1394
  transport: (r) => (e.push(r), n.status >= 200 && n.status < 300 && t.push(r), Promise.resolve({ ...n })),
@@ -1419,49 +1407,49 @@ function jn() {
1419
1407
  }
1420
1408
  //#endregion
1421
1409
  //#region src/index.ts
1422
- var Mn = /* @__PURE__ */ new Map();
1410
+ var Nn = /* @__PURE__ */ new Map();
1423
1411
  function Q() {
1424
1412
  return (Z.current() ?? Z.stopped()) || Z.configure({}, !0);
1425
1413
  }
1426
- function Nn(e) {
1414
+ function Pn(e) {
1427
1415
  Z.configure(e);
1428
1416
  }
1429
- function Pn(e, t) {
1417
+ function Fn(e, t) {
1430
1418
  if (t) return new I(Q, e, t);
1431
- let n = Mn.get(e);
1432
- return n || (n = new I(Q, e), Mn.set(e, n)), n;
1419
+ let n = Nn.get(e);
1420
+ return n || (n = new I(Q, e), Nn.set(e, n)), n;
1433
1421
  }
1434
1422
  function $() {
1435
- return Pn("app");
1423
+ return Fn("app");
1436
1424
  }
1437
- function Fn(e, t) {
1425
+ function In(e, t) {
1438
1426
  $().trace(e, t);
1439
1427
  }
1440
- function In(e, t) {
1428
+ function Ln(e, t) {
1441
1429
  $().debug(e, t);
1442
1430
  }
1443
- function Ln(e, t) {
1431
+ function Rn(e, t) {
1444
1432
  $().info(e, t);
1445
1433
  }
1446
- function Rn(e, t) {
1434
+ function zn(e, t) {
1447
1435
  $().warn(e, t);
1448
1436
  }
1449
- function zn(e, t, n) {
1437
+ function Bn(e, t, n) {
1450
1438
  $().error(e, t, n);
1451
1439
  }
1452
- function Bn(e, t, n) {
1440
+ function Vn(e, t, n) {
1453
1441
  $().fatal(e, t, n);
1454
1442
  }
1455
- function Vn(e, t) {
1443
+ function Hn(e, t) {
1456
1444
  $().logAction(e, t);
1457
1445
  }
1458
- function Hn(e, t) {
1446
+ function Un(e, t) {
1459
1447
  $().logEvent(e, t);
1460
1448
  }
1461
- function Un(e, t, n, r, i) {
1449
+ function Wn(e, t, n, r, i) {
1462
1450
  $().logMetric(e, t, n, r, i);
1463
1451
  }
1464
- function Wn(e, t = {}) {
1452
+ function Gn(e, t = {}) {
1465
1453
  let n = {
1466
1454
  name: e,
1467
1455
  kind: "counter",
@@ -1472,7 +1460,7 @@ function Wn(e, t = {}) {
1472
1460
  Q().recordMetric(n, e, t);
1473
1461
  } };
1474
1462
  }
1475
- function Gn(e, t = {}) {
1463
+ function Kn(e, t = {}) {
1476
1464
  let n = {
1477
1465
  name: e,
1478
1466
  kind: "histogram",
@@ -1483,58 +1471,58 @@ function Gn(e, t = {}) {
1483
1471
  Q().recordMetric(n, e, t);
1484
1472
  } };
1485
1473
  }
1486
- function Kn(e, t, n) {
1474
+ function qn(e, t, n) {
1487
1475
  return $().timeSync(e, t, n);
1488
1476
  }
1489
- function qn(e, t, n) {
1477
+ function Jn(e, t, n) {
1490
1478
  return $().timeAsync(e, t, n);
1491
1479
  }
1492
- function Jn(e, t) {
1480
+ function Yn(e, t) {
1493
1481
  Q().context.set(e, t);
1494
1482
  }
1495
- function Yn(e) {
1483
+ function Xn(e) {
1496
1484
  Q().context.setMany(e);
1497
1485
  }
1498
- function Xn(e) {
1486
+ function Zn(e) {
1499
1487
  Q().context.remove(e);
1500
1488
  }
1501
- function Zn(e, t) {
1489
+ function Qn(e, t) {
1502
1490
  return Q().journey.start(e, t);
1503
1491
  }
1504
- function Qn() {
1492
+ function $n() {
1505
1493
  Q().journey.end();
1506
1494
  }
1507
- function $n() {
1495
+ function er() {
1508
1496
  return Q().journey.current();
1509
1497
  }
1510
- function er() {
1498
+ function tr() {
1511
1499
  return Q().journey.getToken();
1512
1500
  }
1513
- function tr(e) {
1501
+ function nr(e) {
1514
1502
  return Q().journey.adopt(e, "manual", !0);
1515
1503
  }
1516
- function nr(e) {
1504
+ function rr(e) {
1517
1505
  Q().registerWorker(e);
1518
1506
  }
1519
- function rr() {
1507
+ function ir() {
1520
1508
  Q().tracing.rotate("explicit");
1521
1509
  }
1522
- function ir() {
1510
+ function ar() {
1523
1511
  return Q().tracing.headers();
1524
1512
  }
1525
- function ar() {
1513
+ function or() {
1526
1514
  return Q().flush();
1527
1515
  }
1528
- function or() {
1516
+ function sr() {
1529
1517
  return Q().queueDepth();
1530
1518
  }
1531
- function sr() {
1519
+ function cr() {
1532
1520
  return Q().diagnostics.snapshot();
1533
1521
  }
1534
- async function cr() {
1522
+ async function lr() {
1535
1523
  await Z.current()?.destroy();
1536
1524
  }
1537
1525
  //#endregion
1538
- export { I as OneLogger, tr as adoptJourney, Nn as configure, Wn as counter, jn as createMemoryTransport, $n as currentJourney, In as debug, Qn as endJourney, zn as error, Bn as fatal, ar as flush, sr as getDiagnosticCounters, er as getJourneyToken, Pn as getLogger, or as getQueueDepth, ir as getTraceHeaders, Gn as histogram, Ln as info, Vn as logAction, Hn as logEvent, Un as logMetric, nr as registerWorker, Xn as removeContext, Jn as setContext, Yn as setContextMap, cr as shutdown, Zn as startJourney, rr as startTrace, qn as timeAsync, Kn as timeSync, Fn as trace, Rn as warn };
1526
+ export { I as OneLogger, nr as adoptJourney, Pn as configure, Gn as counter, Mn as createMemoryTransport, er as currentJourney, Ln as debug, $n as endJourney, Bn as error, Vn as fatal, or as flush, cr as getDiagnosticCounters, tr as getJourneyToken, Fn as getLogger, sr as getQueueDepth, ar as getTraceHeaders, Kn as histogram, Rn as info, Hn as logAction, Un as logEvent, Wn as logMetric, rr as registerWorker, Zn as removeContext, Yn as setContext, Xn as setContextMap, lr as shutdown, Qn as startJourney, ir as startTrace, Jn as timeAsync, qn as timeSync, In as trace, zn as warn };
1539
1527
 
1540
1528
  //# sourceMappingURL=index.js.map