@utk09/ui-observability 0.5.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.
Files changed (123) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +119 -60
  3. package/dist/bus/bus.d.ts +10 -10
  4. package/dist/bus/links.d.ts +1 -1
  5. package/dist/bus-DeZzr2bx.cjs +2 -0
  6. package/dist/bus-DeZzr2bx.cjs.map +1 -0
  7. package/dist/{bus-D3OO0OcL.js → bus-DfAbg_pg.js} +19 -19
  8. package/dist/bus-DfAbg_pg.js.map +1 -0
  9. package/dist/capture/network.d.ts +2 -2
  10. package/dist/capture/types.d.ts +10 -10
  11. package/dist/capture/web-vitals.d.ts +3 -3
  12. package/dist/constants-C8nZQBmQ.js +86 -0
  13. package/dist/constants-C8nZQBmQ.js.map +1 -0
  14. package/dist/constants-IBL_jd5R.cjs +2 -0
  15. package/dist/constants-IBL_jd5R.cjs.map +1 -0
  16. package/dist/constants.d.ts +56 -43
  17. package/dist/core/breadcrumbs.d.ts +14 -14
  18. package/dist/core/config.d.ts +5 -4
  19. package/dist/core/context.d.ts +2 -2
  20. package/dist/core/diagnostics.d.ts +10 -9
  21. package/dist/core/journey.d.ts +23 -20
  22. package/dist/core/logger.d.ts +7 -7
  23. package/dist/core/pipeline.d.ts +34 -29
  24. package/dist/core/record.d.ts +6 -6
  25. package/dist/core/runtime.d.ts +20 -18
  26. package/dist/core/sampling.d.ts +15 -16
  27. package/dist/core/sender.d.ts +1 -1
  28. package/dist/{errors-Dme9tz-6.js → errors-4MQyjZVj.js} +4 -4
  29. package/dist/errors-4MQyjZVj.js.map +1 -0
  30. package/dist/{errors-DPju_xSI.cjs → errors-CUdShXe7.cjs} +2 -2
  31. package/dist/errors-CUdShXe7.cjs.map +1 -0
  32. package/dist/index.cjs +1 -1
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.ts +7 -5
  35. package/dist/index.js +136 -115
  36. package/dist/index.js.map +1 -1
  37. package/dist/{indexeddb-storage-nxs_rxGx.js → indexeddb-storage-0LtUALBg.js} +16 -16
  38. package/dist/indexeddb-storage-0LtUALBg.js.map +1 -0
  39. package/dist/indexeddb-storage-CcEJlq2l.cjs +2 -0
  40. package/dist/indexeddb-storage-CcEJlq2l.cjs.map +1 -0
  41. package/dist/{interactions-DP0-rIPJ.cjs → interactions-BMNPQ3WH.cjs} +2 -2
  42. package/dist/interactions-BMNPQ3WH.cjs.map +1 -0
  43. package/dist/{interactions-C1romMpE.js → interactions-BaCmoGLB.js} +2 -2
  44. package/dist/interactions-BaCmoGLB.js.map +1 -0
  45. package/dist/models/batch.d.ts +12 -9
  46. package/dist/models/bus.d.ts +12 -13
  47. package/dist/models/config.d.ts +85 -44
  48. package/dist/models/log-record.d.ts +12 -10
  49. package/dist/models/serializer.d.ts +3 -2
  50. package/dist/models/storage.d.ts +2 -2
  51. package/dist/network-DBNvxCE3.cjs +2 -0
  52. package/dist/network-DBNvxCE3.cjs.map +1 -0
  53. package/dist/{network-au-Tqt1n.js → network-jQ2t8rU4.js} +4 -4
  54. package/dist/network-jQ2t8rU4.js.map +1 -0
  55. package/dist/platform-ByQllE_W.cjs +2 -0
  56. package/dist/platform-ByQllE_W.cjs.map +1 -0
  57. package/dist/{platform-DMYo3AX3.js → platform-YuByH8A5.js} +8 -8
  58. package/dist/platform-YuByH8A5.js.map +1 -0
  59. package/dist/{sampling-ByI5H44E.js → sampling-CbYySsZ1.js} +21 -18
  60. package/dist/sampling-CbYySsZ1.js.map +1 -0
  61. package/dist/sampling-Cs50xsZl.cjs +2 -0
  62. package/dist/sampling-Cs50xsZl.cjs.map +1 -0
  63. package/dist/{sender-R7lOpyNc.js → sender-BIob8eZz.js} +60 -60
  64. package/dist/sender-BIob8eZz.js.map +1 -0
  65. package/dist/sender-iOjzcueM.cjs +3 -0
  66. package/dist/sender-iOjzcueM.cjs.map +1 -0
  67. package/dist/storage/emergency-queue.d.ts +2 -2
  68. package/dist/storage/factory.d.ts +2 -1
  69. package/dist/storage/idb-driver.d.ts +19 -19
  70. package/dist/storage/indexeddb-storage.d.ts +18 -17
  71. package/dist/storage/keys.d.ts +1 -1
  72. package/dist/storage/local-storage.d.ts +19 -18
  73. package/dist/storage/memory-storage.d.ts +12 -11
  74. package/dist/transport/compression.d.ts +2 -2
  75. package/dist/transport/errors.d.ts +8 -7
  76. package/dist/transport/exit-flush.d.ts +27 -24
  77. package/dist/transport/http-transport.d.ts +18 -11
  78. package/dist/transport/retry-engine.d.ts +33 -28
  79. package/dist/transport/serializers/ecs.d.ts +1 -1
  80. package/dist/transport/serializers/otlp.d.ts +1 -1
  81. package/dist/unref-16maCyKA.js.map +1 -1
  82. package/dist/unref-CU9Nyz_9.cjs.map +1 -1
  83. package/dist/utils/console.d.ts +7 -6
  84. package/dist/utils/identity.d.ts +6 -5
  85. package/dist/utils/lock.d.ts +4 -4
  86. package/dist/utils/platform.d.ts +5 -3
  87. package/dist/utils/sanitize.d.ts +5 -2
  88. package/dist/utils/sequence.d.ts +2 -2
  89. package/dist/utils/tracing.d.ts +8 -7
  90. package/dist/web-vitals-B2FYsEAU.cjs +2 -0
  91. package/dist/web-vitals-B2FYsEAU.cjs.map +1 -0
  92. package/dist/{web-vitals-DwWdLBq6.js → web-vitals-DHZ0yA_H.js} +4 -4
  93. package/dist/web-vitals-DHZ0yA_H.js.map +1 -0
  94. package/package.json +4 -2
  95. package/dist/bus-D3OO0OcL.js.map +0 -1
  96. package/dist/bus-OdRJVUzr.cjs +0 -2
  97. package/dist/bus-OdRJVUzr.cjs.map +0 -1
  98. package/dist/constants-B6kdsCzF.js +0 -75
  99. package/dist/constants-B6kdsCzF.js.map +0 -1
  100. package/dist/constants-DZH04585.cjs +0 -2
  101. package/dist/constants-DZH04585.cjs.map +0 -1
  102. package/dist/errors-DPju_xSI.cjs.map +0 -1
  103. package/dist/errors-Dme9tz-6.js.map +0 -1
  104. package/dist/indexeddb-storage-lGdoHGHy.cjs +0 -2
  105. package/dist/indexeddb-storage-lGdoHGHy.cjs.map +0 -1
  106. package/dist/indexeddb-storage-nxs_rxGx.js.map +0 -1
  107. package/dist/interactions-C1romMpE.js.map +0 -1
  108. package/dist/interactions-DP0-rIPJ.cjs.map +0 -1
  109. package/dist/network-DDVIJSHd.cjs +0 -2
  110. package/dist/network-DDVIJSHd.cjs.map +0 -1
  111. package/dist/network-au-Tqt1n.js.map +0 -1
  112. package/dist/platform-DMYo3AX3.js.map +0 -1
  113. package/dist/platform-g99Kn755.cjs +0 -2
  114. package/dist/platform-g99Kn755.cjs.map +0 -1
  115. package/dist/sampling-ByI5H44E.js.map +0 -1
  116. package/dist/sampling-Dui-Fp3u.cjs +0 -2
  117. package/dist/sampling-Dui-Fp3u.cjs.map +0 -1
  118. package/dist/sender-R7lOpyNc.js.map +0 -1
  119. package/dist/sender-vLcbQhiB.cjs +0 -3
  120. package/dist/sender-vLcbQhiB.cjs.map +0 -1
  121. package/dist/web-vitals-DM2nvcMJ.cjs +0 -2
  122. package/dist/web-vitals-DM2nvcMJ.cjs.map +0 -1
  123. package/dist/web-vitals-DwWdLBq6.js.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";
@@ -91,7 +92,7 @@ export declare function timeSync<T>(label: string, fn: () => T, attributes?: Rec
91
92
  */
92
93
  export declare function timeAsync<T>(label: string, fn: () => Promise<T>, attributes?: Record<string, unknown>): Promise<T>;
93
94
  /**
94
- * Sets a key-value pair on ambient context included in subsequent records.
95
+ * Sets a key-value pair on the ambient context. All later records include it.
95
96
  * @param key Attribute key.
96
97
  * @param value Attribute value.
97
98
  */
@@ -130,7 +131,7 @@ export declare function getJourneyToken(): string | undefined;
130
131
  /**
131
132
  * Adopts a serialized journey token into this application realm.
132
133
  * @param token Serialized journey token.
133
- * @returns True if token was valid and successfully adopted.
134
+ * @returns True if the token is valid and the runtime adopts it.
134
135
  */
135
136
  export declare function adoptJourney(token: string): boolean;
136
137
  /**
@@ -147,12 +148,13 @@ export declare function startTrace(): void;
147
148
  export declare function getTraceHeaders(): Record<string, string>;
148
149
  /**
149
150
  * Flushes all pending log batches across pipeline streams.
150
- * @returns Promise resolving once queued batches are processed.
151
+ * @returns Promise that resolves after the pipeline processes the queued batches.
151
152
  */
152
153
  export declare function flush(): Promise<void>;
153
154
  /**
154
155
  * Counts the batches waiting in storage for delivery.
155
- * @returns Promise resolving to the number of stored batches. A forwarder reports 0, because it persists nothing.
156
+ * @returns Promise resolving to the number of stored batches. A forwarder reports 0.
157
+ * A forwarder does not store batches.
156
158
  */
157
159
  export declare function getQueueDepth(): Promise<number>;
158
160
  /**
@@ -161,7 +163,7 @@ export declare function getQueueDepth(): Promise<number>;
161
163
  */
162
164
  export declare function getDiagnosticCounters(): Record<string, number>;
163
165
  /**
164
- * Flushes pending records and tears down all runtime subsystems.
166
+ * Flushes pending records and stops all runtime subsystems.
165
167
  * @returns Promise resolving once shutdown completes.
166
168
  */
167
169
  export declare function shutdown(): Promise<void>;