logixia 2.0.0 → 2.0.6
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/README.md +172 -2597
- package/dist/async-context-2mbUKhcl.mjs +132 -0
- package/dist/async-context-2mbUKhcl.mjs.map +1 -0
- package/dist/async-context-DUFMDYAr.js +148 -0
- package/dist/async-context-DUFMDYAr.js.map +1 -0
- package/dist/{azure-monitor.transport-CrvfHd9C.js → azure-monitor.transport-Bu4S2I2q.js} +32 -20
- package/dist/azure-monitor.transport-Bu4S2I2q.js.map +1 -0
- package/dist/{azure-monitor.transport-Cn_3Usvu.d.ts → azure-monitor.transport-Bvf7Xegt.d.ts} +3 -6
- package/dist/azure-monitor.transport-Bvf7Xegt.d.ts.map +1 -0
- package/dist/{azure-monitor.transport-CHnjVRF-.mjs → azure-monitor.transport-C1RWAumT.mjs} +27 -15
- package/dist/azure-monitor.transport-C1RWAumT.mjs.map +1 -0
- package/dist/{azure-monitor.transport-D7Da4RAb.d.mts → azure-monitor.transport-CbSHOnNX.d.mts} +3 -6
- package/dist/azure-monitor.transport-CbSHOnNX.d.mts.map +1 -0
- package/dist/azure.d.mts +1 -2
- package/dist/azure.d.ts +1 -2
- package/dist/azure.js +3 -6
- package/dist/azure.mjs +1 -6
- package/dist/{batch-buffer-PGvSgbmd.mjs → batch-buffer-BvXLDPlV.mjs} +21 -7
- package/dist/batch-buffer-BvXLDPlV.mjs.map +1 -0
- package/dist/{batch-buffer-BY-mRWIK.js → batch-buffer-C7Am4Mw-.js} +53 -40
- package/dist/batch-buffer-C7Am4Mw-.js.map +1 -0
- package/dist/browser.d.mts +47 -27
- package/dist/browser.d.mts.map +1 -1
- package/dist/browser.d.ts +47 -27
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +464 -62
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +465 -65
- package/dist/browser.mjs.map +1 -1
- package/dist/{builder-0gEzRopq.mjs → builder-DhNhvOkt.mjs} +307 -246
- package/dist/builder-DhNhvOkt.mjs.map +1 -0
- package/dist/{builder-D44QktIo.js → builder-yFvJrz7o.js} +435 -399
- package/dist/builder-yFvJrz7o.js.map +1 -0
- package/dist/cli/index.js +216 -125
- package/dist/cloudwatch.d.mts +1 -2
- package/dist/cloudwatch.d.ts +1 -2
- package/dist/cloudwatch.js +3 -7
- package/dist/cloudwatch.mjs +1 -7
- package/dist/{cloudwatch.transport-DsEq633o.d.ts → cloudwatch.transport-CQyT6U91.d.ts} +2 -6
- package/dist/cloudwatch.transport-CQyT6U91.d.ts.map +1 -0
- package/dist/{cloudwatch.transport-BO1ahxw-.js → cloudwatch.transport-Ch1Uae-0.js} +61 -36
- package/dist/cloudwatch.transport-Ch1Uae-0.js.map +1 -0
- package/dist/{cloudwatch.transport-UlyZFWMn.d.mts → cloudwatch.transport-CjVrI6S4.d.mts} +2 -6
- package/dist/cloudwatch.transport-CjVrI6S4.d.mts.map +1 -0
- package/dist/{cloudwatch.transport-DZ6ies7g.mjs → cloudwatch.transport-DZqF2xZO.mjs} +54 -28
- package/dist/cloudwatch.transport-DZqF2xZO.mjs.map +1 -0
- package/dist/{coerce.utils-Cu6IUTgX.mjs → coerce.utils-B_rEudCn.mjs} +3 -4
- package/dist/{coerce.utils-Cu6IUTgX.mjs.map → coerce.utils-B_rEudCn.mjs.map} +1 -1
- package/dist/{coerce.utils-B-LilukN.js → coerce.utils-C1C5sIX0.js} +8 -10
- package/dist/{coerce.utils-B-LilukN.js.map → coerce.utils-C1C5sIX0.js.map} +1 -1
- package/dist/correlation.d.mts +15 -69
- package/dist/correlation.d.mts.map +1 -1
- package/dist/correlation.d.ts +15 -69
- package/dist/correlation.d.ts.map +1 -1
- package/dist/correlation.js +69 -20
- package/dist/correlation.js.map +1 -1
- package/dist/correlation.mjs +67 -17
- package/dist/correlation.mjs.map +1 -1
- package/dist/{entry-fields-BvOLFlJ4.js → entry-fields-BSLkzw18.js} +16 -13
- package/dist/entry-fields-BSLkzw18.js.map +1 -0
- package/dist/{entry-fields-BJkuPnIg.mjs → entry-fields-J1OBi24o.mjs} +11 -7
- package/dist/entry-fields-J1OBi24o.mjs.map +1 -0
- package/dist/gcp.d.mts +1 -2
- package/dist/gcp.d.ts +1 -2
- package/dist/gcp.js +3 -7
- package/dist/gcp.mjs +1 -7
- package/dist/{gcp.transport-B7oc97sG.d.ts → gcp.transport-BCIvdFV-.d.ts} +5 -8
- package/dist/gcp.transport-BCIvdFV-.d.ts.map +1 -0
- package/dist/{gcp.transport-GrJurKo8.d.mts → gcp.transport-D9SdLPwP.d.mts} +5 -8
- package/dist/gcp.transport-D9SdLPwP.d.mts.map +1 -0
- package/dist/{gcp.transport-DBX5TPIy.mjs → gcp.transport-DVCmnA3b.mjs} +59 -16
- package/dist/gcp.transport-DVCmnA3b.mjs.map +1 -0
- package/dist/{gcp.transport-CHV8MGgz.js → gcp.transport-Dy2Lf8FI.js} +64 -22
- package/dist/gcp.transport-Dy2Lf8FI.js.map +1 -0
- package/dist/http-shapes-BnBkJcid.d.mts +32 -0
- package/dist/http-shapes-BnBkJcid.d.mts.map +1 -0
- package/dist/http-shapes-BnBkJcid.d.ts +32 -0
- package/dist/http-shapes-BnBkJcid.d.ts.map +1 -0
- package/dist/{index-3mw5gaCw.d.mts → index-BSTtFcQ6.d.mts} +142 -13
- package/dist/index-BSTtFcQ6.d.mts.map +1 -0
- package/dist/{index-DhIoploR.d.ts → index-CFDGkI8n.d.ts} +142 -13
- package/dist/index-CFDGkI8n.d.ts.map +1 -0
- package/dist/index.d.mts +114 -217
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +113 -216
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +182 -279
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +160 -256
- package/dist/index.mjs.map +1 -1
- package/dist/internal-log-Bg4V1cPg.mjs +170 -0
- package/dist/internal-log-Bg4V1cPg.mjs.map +1 -0
- package/dist/internal-log-By4Govmu.js +223 -0
- package/dist/internal-log-By4Govmu.js.map +1 -0
- package/dist/{logitron-logger-UVeN-mQm.d.ts → logitron-logger-D22Yb61K.d.mts} +121 -100
- package/dist/logitron-logger-D22Yb61K.d.mts.map +1 -0
- package/dist/{logitron-logger-BFDSO8Io.d.mts → logitron-logger-D_MYYrQt.d.ts} +121 -100
- package/dist/logitron-logger-D_MYYrQt.d.ts.map +1 -0
- package/dist/middleware.d.mts +13 -28
- package/dist/middleware.d.mts.map +1 -1
- package/dist/middleware.d.ts +13 -28
- package/dist/middleware.d.ts.map +1 -1
- package/dist/middleware.js +20 -81
- package/dist/middleware.js.map +1 -1
- package/dist/middleware.mjs +17 -79
- package/dist/middleware.mjs.map +1 -1
- package/dist/nest.d.mts +37 -48
- package/dist/nest.d.mts.map +1 -1
- package/dist/nest.d.ts +37 -48
- package/dist/nest.d.ts.map +1 -1
- package/dist/nest.js +124 -135
- package/dist/nest.js.map +1 -1
- package/dist/nest.mjs +69 -78
- package/dist/nest.mjs.map +1 -1
- package/dist/{transport.manager-BiuCAJd2.mjs → otel-Dt5riXuE.mjs} +275 -117
- package/dist/otel-Dt5riXuE.mjs.map +1 -0
- package/dist/{transport.manager-CXbKKdVE.js → otel-DyeH6DVR.js} +373 -178
- package/dist/otel-DyeH6DVR.js.map +1 -0
- package/dist/own-property-BWkibepN.js +40 -0
- package/dist/own-property-BWkibepN.js.map +1 -0
- package/dist/own-property-CjFw9qwZ.mjs +29 -0
- package/dist/own-property-CjFw9qwZ.mjs.map +1 -0
- package/dist/{trace.utils-CvXgaiQT.mjs → request-trace-BgNykH9M.mjs} +40 -9
- package/dist/request-trace-BgNykH9M.mjs.map +1 -0
- package/dist/{trace.utils-DpBOLDtq.js → request-trace-ByujsUZk.js} +117 -77
- package/dist/request-trace-ByujsUZk.js.map +1 -0
- package/dist/rolldown-runtime-D3PmRqjj.mjs +4 -0
- package/dist/{safe-stringify-DJ66tW5I.mjs → safe-stringify-B5p5ktFe.mjs} +39 -15
- package/dist/safe-stringify-B5p5ktFe.mjs.map +1 -0
- package/dist/{safe-stringify-DWo3aZp_.js → safe-stringify-J3sh-7YM.js} +59 -36
- package/dist/safe-stringify-J3sh-7YM.js.map +1 -0
- package/dist/{search-C4V0OMEn.js → search-CRjhHxe9.js} +319 -92
- package/dist/search-CRjhHxe9.js.map +1 -0
- package/dist/{search-CNh9uVwR.d.ts → search-DA3ft3X5.d.mts} +5 -22
- package/dist/search-DA3ft3X5.d.mts.map +1 -0
- package/dist/{search-BFbu_oVn.mjs → search-DAXKE-P9.mjs} +289 -62
- package/dist/search-DAXKE-P9.mjs.map +1 -0
- package/dist/{search-DXANsQ2n.d.mts → search-DEl3Pe47.d.ts} +5 -22
- package/dist/search-DEl3Pe47.d.ts.map +1 -0
- package/dist/search.d.mts +2 -4
- package/dist/search.d.ts +2 -4
- package/dist/search.js +3 -4
- package/dist/search.mjs +1 -4
- package/dist/secret-config-CmK2wVkr.js +272 -0
- package/dist/secret-config-CmK2wVkr.js.map +1 -0
- package/dist/secret-config-Dhb6pqTU.mjs +210 -0
- package/dist/secret-config-Dhb6pqTU.mjs.map +1 -0
- package/dist/{slack.transport-CXjQYOes.d.ts → slack.transport-BDyENuR0.d.mts} +56 -9
- package/dist/slack.transport-BDyENuR0.d.mts.map +1 -0
- package/dist/{slack.transport-Bzw7sucI.mjs → slack.transport-BTEwsREY.mjs} +263 -31
- package/dist/slack.transport-BTEwsREY.mjs.map +1 -0
- package/dist/{slack.transport-BZzoXDPn.d.mts → slack.transport-C6E0l4kw.d.ts} +56 -9
- package/dist/slack.transport-C6E0l4kw.d.ts.map +1 -0
- package/dist/{slack.transport-BfJRouB2.js → slack.transport-UbYvOdKx.js} +286 -42
- package/dist/slack.transport-UbYvOdKx.js.map +1 -0
- package/dist/testing.d.mts +13 -11
- package/dist/testing.d.mts.map +1 -1
- package/dist/testing.d.ts +13 -11
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +41 -7
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +40 -6
- package/dist/testing.mjs.map +1 -1
- package/dist/{transport.types-CGoHpWQR.d.ts → transport.types-CzJq4IrF.d.mts} +14 -5
- package/dist/transport.types-CzJq4IrF.d.mts.map +1 -0
- package/dist/{transport.types-BMnurPcc.d.mts → transport.types-CzJq4IrF.d.ts} +14 -5
- package/dist/transport.types-CzJq4IrF.d.ts.map +1 -0
- package/dist/transports.d.mts +39 -41
- package/dist/transports.d.mts.map +1 -1
- package/dist/transports.d.ts +39 -41
- package/dist/transports.d.ts.map +1 -1
- package/dist/transports.js +19 -22
- package/dist/transports.mjs +7 -13
- package/dist/worker-entry.js +438 -107
- package/dist/worker.d.mts +1 -2
- package/dist/worker.d.ts +1 -2
- package/dist/worker.js +3 -4
- package/dist/worker.mjs +1 -4
- package/dist/{worker.transport-JvGPog3C.d.mts → worker.transport-B9mCQSM1.d.ts} +7 -6
- package/dist/worker.transport-B9mCQSM1.d.ts.map +1 -0
- package/dist/{worker.transport-CdzSZJmw.d.ts → worker.transport-Bl8lFRck.d.mts} +7 -6
- package/dist/worker.transport-Bl8lFRck.d.mts.map +1 -0
- package/dist/{worker.transport-lPxO2MVL.mjs → worker.transport-BmmOKb1-.mjs} +43 -10
- package/dist/worker.transport-BmmOKb1-.mjs.map +1 -0
- package/dist/{worker.transport-BdPxu3PN.js → worker.transport-DxxbqQCG.js} +48 -15
- package/dist/worker.transport-DxxbqQCG.js.map +1 -0
- package/package.json +51 -75
- package/dist/async-context-BzJrbfQs.mjs +0 -72
- package/dist/async-context-BzJrbfQs.mjs.map +0 -1
- package/dist/async-context-DyQQYq3I.js +0 -92
- package/dist/async-context-DyQQYq3I.js.map +0 -1
- package/dist/azure-monitor.transport-CHnjVRF-.mjs.map +0 -1
- package/dist/azure-monitor.transport-Cn_3Usvu.d.ts.map +0 -1
- package/dist/azure-monitor.transport-CrvfHd9C.js.map +0 -1
- package/dist/azure-monitor.transport-D7Da4RAb.d.mts.map +0 -1
- package/dist/batch-buffer-BY-mRWIK.js.map +0 -1
- package/dist/batch-buffer-PGvSgbmd.mjs.map +0 -1
- package/dist/builder-0gEzRopq.mjs.map +0 -1
- package/dist/builder-D44QktIo.js.map +0 -1
- package/dist/chunk-DLSkYcPk.mjs +0 -7
- package/dist/chunk-nOFOJqeH.js +0 -30
- package/dist/cloudwatch.transport-BO1ahxw-.js.map +0 -1
- package/dist/cloudwatch.transport-DZ6ies7g.mjs.map +0 -1
- package/dist/cloudwatch.transport-DsEq633o.d.ts.map +0 -1
- package/dist/cloudwatch.transport-UlyZFWMn.d.mts.map +0 -1
- package/dist/entry-fields-BJkuPnIg.mjs.map +0 -1
- package/dist/entry-fields-BvOLFlJ4.js.map +0 -1
- package/dist/gcp.transport-B7oc97sG.d.ts.map +0 -1
- package/dist/gcp.transport-CHV8MGgz.js.map +0 -1
- package/dist/gcp.transport-DBX5TPIy.mjs.map +0 -1
- package/dist/gcp.transport-GrJurKo8.d.mts.map +0 -1
- package/dist/index-3mw5gaCw.d.mts.map +0 -1
- package/dist/index-DhIoploR.d.ts.map +0 -1
- package/dist/internal-log-BUJYMZbE.js +0 -70
- package/dist/internal-log-BUJYMZbE.js.map +0 -1
- package/dist/internal-log-Cm8SOWSV.mjs +0 -52
- package/dist/internal-log-Cm8SOWSV.mjs.map +0 -1
- package/dist/logitron-logger-BFDSO8Io.d.mts.map +0 -1
- package/dist/logitron-logger-UVeN-mQm.d.ts.map +0 -1
- package/dist/safe-stringify-DJ66tW5I.mjs.map +0 -1
- package/dist/safe-stringify-DWo3aZp_.js.map +0 -1
- package/dist/search-BFbu_oVn.mjs.map +0 -1
- package/dist/search-C4V0OMEn.js.map +0 -1
- package/dist/search-CNh9uVwR.d.ts.map +0 -1
- package/dist/search-DXANsQ2n.d.mts.map +0 -1
- package/dist/slack.transport-BZzoXDPn.d.mts.map +0 -1
- package/dist/slack.transport-BfJRouB2.js.map +0 -1
- package/dist/slack.transport-Bzw7sucI.mjs.map +0 -1
- package/dist/slack.transport-CXjQYOes.d.ts.map +0 -1
- package/dist/trace.utils-CvXgaiQT.mjs.map +0 -1
- package/dist/trace.utils-DpBOLDtq.js.map +0 -1
- package/dist/transport.manager-BiuCAJd2.mjs.map +0 -1
- package/dist/transport.manager-CXbKKdVE.js.map +0 -1
- package/dist/transport.types-BMnurPcc.d.mts.map +0 -1
- package/dist/transport.types-CGoHpWQR.d.ts.map +0 -1
- package/dist/worker.transport-BdPxu3PN.js.map +0 -1
- package/dist/worker.transport-CdzSZJmw.d.ts.map +0 -1
- package/dist/worker.transport-JvGPog3C.d.mts.map +0 -1
- package/dist/worker.transport-lPxO2MVL.mjs.map +0 -1
package/dist/azure.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
require(
|
|
3
|
-
|
|
4
|
-
const require_azure_monitor_transport = require('./azure-monitor.transport-CrvfHd9C.js');
|
|
5
|
-
|
|
6
|
-
exports.AzureMonitorTransport = require_azure_monitor_transport.AzureMonitorTransport;
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_azure_monitor_transport = require("./azure-monitor.transport-Bu4S2I2q.js");
|
|
3
|
+
exports.AzureMonitorTransport = require_azure_monitor_transport.AzureMonitorTransport;
|
package/dist/azure.mjs
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import "./safe-stringify-DJ66tW5I.mjs";
|
|
3
|
-
import "./batch-buffer-PGvSgbmd.mjs";
|
|
4
|
-
import { t as AzureMonitorTransport } from "./azure-monitor.transport-CHnjVRF-.mjs";
|
|
5
|
-
|
|
6
|
-
export { AzureMonitorTransport };
|
|
1
|
+
export { t as AzureMonitorTransport } from "./azure-monitor.transport-C1RWAumT.mjs";
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
import { r as internalWarn, t as internalError } from "./internal-log-
|
|
1
|
+
import { r as internalWarn, t as internalError } from "./internal-log-Bg4V1cPg.mjs";
|
|
2
|
+
import { a as scrubbing, r as scrubError } from "./secret-config-Dhb6pqTU.mjs";
|
|
2
3
|
import * as http from "node:http";
|
|
3
4
|
import * as https from "node:https";
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
// src/transports/batch-buffer.ts
|
|
6
|
+
/**
|
|
7
|
+
* Shared batching core for the network transports (OTLP, CloudWatch, GCP, Azure).
|
|
8
|
+
*
|
|
9
|
+
* - one send in flight at a time; flush() and close() join it instead of
|
|
10
|
+
* racing it, so close() cannot return while a request is still on the wire
|
|
11
|
+
* - a failed batch goes back to the front in its original order
|
|
12
|
+
* - 4xx responses other than 429 drop the batch with a warning instead of
|
|
13
|
+
* retrying a request the server will never accept
|
|
14
|
+
* - the buffer is capped; when full the oldest entries are dropped
|
|
15
|
+
*/
|
|
6
16
|
const DEFAULT_REQUEST_TIMEOUT_MS = 1e4;
|
|
7
17
|
const DEFAULT_MAX_BUFFER_SIZE = 1e4;
|
|
8
18
|
const WARN_INTERVAL_MS = 1e4;
|
|
@@ -22,6 +32,9 @@ function isPermanentHttpError(err) {
|
|
|
22
32
|
}
|
|
23
33
|
/** One request with a hard timeout. Rejects with HttpError on any non-2xx status. */
|
|
24
34
|
function httpRequest(opts) {
|
|
35
|
+
return sendRequest(opts).catch(scrubbing(opts.secrets ?? (() => [])));
|
|
36
|
+
}
|
|
37
|
+
function sendRequest(opts) {
|
|
25
38
|
const { url, method = "POST", headers = {}, body, timeoutMs, label } = opts;
|
|
26
39
|
const transport = url.protocol === "http:" ? http : https;
|
|
27
40
|
return new Promise((resolve, reject) => {
|
|
@@ -99,6 +112,8 @@ var BatchBuffer = class {
|
|
|
99
112
|
await this.opts.send(batch);
|
|
100
113
|
this.failures = 0;
|
|
101
114
|
} catch (err) {
|
|
115
|
+
var _this$opts$secrets, _this$opts;
|
|
116
|
+
scrubError(err, ((_this$opts$secrets = (_this$opts = this.opts).secrets) === null || _this$opts$secrets === void 0 ? void 0 : _this$opts$secrets.call(_this$opts)) ?? []);
|
|
102
117
|
if (!(this.opts.shouldRetry ? this.opts.shouldRetry(err) : !isPermanentHttpError(err))) {
|
|
103
118
|
internalWarn(`${this.opts.name}: dropping ${batch.length} entr${batch.length === 1 ? "y" : "ies"} the server rejected (${err instanceof Error ? err.message : String(err)})`);
|
|
104
119
|
continue;
|
|
@@ -113,7 +128,7 @@ var BatchBuffer = class {
|
|
|
113
128
|
}
|
|
114
129
|
}
|
|
115
130
|
enforceCap() {
|
|
116
|
-
const max = this.opts.maxBufferSize ??
|
|
131
|
+
const max = this.opts.maxBufferSize ?? 1e4;
|
|
117
132
|
const excess = this.items.length - max;
|
|
118
133
|
if (excess <= 0) return;
|
|
119
134
|
this.items.splice(0, excess);
|
|
@@ -126,7 +141,6 @@ var BatchBuffer = class {
|
|
|
126
141
|
}
|
|
127
142
|
}
|
|
128
143
|
};
|
|
129
|
-
|
|
130
|
-
//#endregion
|
|
131
144
|
export { httpRequest as a, HttpError as i, DEFAULT_MAX_BUFFER_SIZE as n, isPermanentHttpError as o, DEFAULT_REQUEST_TIMEOUT_MS as r, BatchBuffer as t };
|
|
132
|
-
|
|
145
|
+
|
|
146
|
+
//# sourceMappingURL=batch-buffer-BvXLDPlV.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch-buffer-BvXLDPlV.mjs","names":[],"sources":["../src/transports/batch-buffer.ts"],"sourcesContent":["/**\n * Shared batching core for the network transports (OTLP, CloudWatch, GCP, Azure).\n *\n * - one send in flight at a time; flush() and close() join it instead of\n * racing it, so close() cannot return while a request is still on the wire\n * - a failed batch goes back to the front in its original order\n * - 4xx responses other than 429 drop the batch with a warning instead of\n * retrying a request the server will never accept\n * - the buffer is capped; when full the oldest entries are dropped\n */\n\nimport * as http from 'node:http';\nimport * as https from 'node:https';\n\nimport { internalError, internalWarn } from '../utils/internal-log';\nimport { scrubbing, scrubError } from './secret-config';\n\nexport const DEFAULT_REQUEST_TIMEOUT_MS = 10_000;\nexport const DEFAULT_MAX_BUFFER_SIZE = 10_000;\nconst WARN_INTERVAL_MS = 10_000;\nconst MAX_ERROR_BODY = 500;\nconst MAX_BACKOFF_MS = 30_000;\n\nexport class HttpError extends Error {\n constructor(\n public readonly status: number,\n public readonly body: string,\n label: string\n ) {\n const detail = body ? `: ${body.slice(0, MAX_ERROR_BODY)}` : '';\n super(`${label} returned HTTP ${status}${detail}`);\n this.name = 'HttpError';\n }\n}\n\nexport function isPermanentHttpError(err: unknown): boolean {\n return err instanceof HttpError && err.status >= 400 && err.status < 500 && err.status !== 429;\n}\n\nexport interface HttpRequestOptions {\n url: URL;\n method?: string;\n headers?: Record<string, string>;\n body?: string;\n timeoutMs: number;\n label: string;\n /** Secret values to scrub from any error this request raises. URL userinfo is always scrubbed. */\n secrets?: () => (string | undefined)[];\n}\n\nexport interface HttpResult {\n status: number;\n body: string;\n}\n\n/** One request with a hard timeout. Rejects with HttpError on any non-2xx status. */\nexport function httpRequest(opts: HttpRequestOptions): Promise<HttpResult> {\n return sendRequest(opts).catch(scrubbing(opts.secrets ?? (() => [])));\n}\n\nfunction sendRequest(opts: HttpRequestOptions): Promise<HttpResult> {\n const { url, method = 'POST', headers = {}, body, timeoutMs, label } = opts;\n const transport = url.protocol === 'http:' ? http : https;\n return new Promise<HttpResult>((resolve, reject) => {\n const req = transport.request(\n {\n protocol: url.protocol,\n hostname: url.hostname,\n port: url.port || undefined,\n path: `${url.pathname}${url.search}`,\n method,\n headers:\n body === undefined ? headers : { ...headers, 'Content-Length': Buffer.byteLength(body) },\n },\n (res) => {\n let raw = '';\n res.on('data', (c: Buffer) => (raw += c.toString()));\n res.on('end', () => {\n const status = res.statusCode ?? 0;\n if (status >= 200 && status < 300) resolve({ status, body: raw });\n else reject(new HttpError(status, raw, label));\n });\n res.on('error', reject);\n }\n );\n req.setTimeout(timeoutMs, () => {\n req.destroy(new Error(`${label} timed out after ${timeoutMs}ms`));\n });\n req.on('error', reject);\n if (body !== undefined) req.write(body);\n req.end();\n });\n}\n\nexport interface BatchBufferOptions<T> {\n name: string;\n batchSize: number;\n maxBufferSize?: number;\n send: (items: T[]) => Promise<void>;\n /** Secret values to scrub from send errors before they are stored or logged. */\n secrets?: () => (string | undefined)[];\n /** Overrides the default drop-on-4xx rule. Return true to keep and retry the batch. */\n shouldRetry?: (err: unknown) => boolean;\n}\n\nexport class BatchBuffer<T> {\n private items: T[] = [];\n private inFlight: Promise<void> | undefined;\n private dropped = 0;\n private lastDropWarn = 0;\n private failures = 0;\n private retryAfter = 0;\n\n constructor(private readonly opts: BatchBufferOptions<T>) {}\n\n get length(): number {\n return this.items.length;\n }\n\n get batchSize(): number {\n return this.opts.batchSize;\n }\n\n push(item: T): void {\n this.items.push(item);\n this.enforceCap();\n }\n\n /** Threshold flush for write(): skipped while a send is running or the endpoint is backing off. */\n flushIfFull(): void {\n if (this.items.length < this.opts.batchSize || this.inFlight || Date.now() < this.retryAfter) {\n return;\n }\n this.flush().catch(() => {});\n }\n\n flush(): Promise<void> {\n if (!this.inFlight) {\n this.inFlight = this.drain().finally(() => {\n this.inFlight = undefined;\n });\n }\n return this.inFlight;\n }\n\n /** Flush up to `attempts` times, then report whatever is still undelivered. */\n async close(attempts = 3): Promise<void> {\n await this.inFlight;\n for (let i = 0; i < attempts && this.items.length > 0; i += 1) {\n await this.flush();\n }\n if (this.items.length > 0) {\n internalError(\n `${this.opts.name} closing with ${this.items.length} undelivered entr${this.items.length === 1 ? 'y' : 'ies'}`\n );\n }\n }\n\n private async drain(): Promise<void> {\n while (this.items.length > 0) {\n const batch = this.items.splice(0, this.opts.batchSize);\n try {\n await this.opts.send(batch);\n this.failures = 0;\n } catch (err) {\n scrubError(err, this.opts.secrets?.() ?? []);\n const retry = this.opts.shouldRetry\n ? this.opts.shouldRetry(err)\n : !isPermanentHttpError(err);\n if (!retry) {\n internalWarn(\n `${this.opts.name}: dropping ${batch.length} entr${batch.length === 1 ? 'y' : 'ies'} the server rejected (${err instanceof Error ? err.message : String(err)})`\n );\n continue;\n }\n internalError(`${this.opts.name} flush error`, err);\n this.items.unshift(...batch);\n this.enforceCap();\n this.failures += 1;\n this.retryAfter = Date.now() + Math.min(MAX_BACKOFF_MS, 1000 * 2 ** (this.failures - 1));\n return;\n }\n }\n }\n\n private enforceCap(): void {\n const max = this.opts.maxBufferSize ?? DEFAULT_MAX_BUFFER_SIZE;\n const excess = this.items.length - max;\n if (excess <= 0) return;\n this.items.splice(0, excess);\n this.dropped += excess;\n const now = Date.now();\n if (now - this.lastDropWarn >= WARN_INTERVAL_MS) {\n internalWarn(\n `${this.opts.name}: buffer full (${max}), dropped ${this.dropped} oldest entr${this.dropped === 1 ? 'y' : 'ies'}`\n );\n this.dropped = 0;\n this.lastDropWarn = now;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiBA,MAAa,6BAA6B;AAC1C,MAAa,0BAA0B;AACvC,MAAM,mBAAmB;AACzB,MAAM,iBAAiB;AACvB,MAAM,iBAAiB;AAEvB,IAAa,YAAb,cAA+B,MAAM;CACnC,YACE,QACA,MACA,OACA;EACA,MAAM,SAAS,OAAO,KAAK,KAAK,MAAM,GAAG,cAAc,MAAM;EAC7D,MAAM,GAAG,MAAM,iBAAiB,SAAS,QAAQ;EALjC,KAAA,SAAA;EACA,KAAA,OAAA;EAKhB,KAAK,OAAO;CACd;AACF;AAEA,SAAgB,qBAAqB,KAAuB;CAC1D,OAAO,eAAe,aAAa,IAAI,UAAU,OAAO,IAAI,SAAS,OAAO,IAAI,WAAW;AAC7F;;AAmBA,SAAgB,YAAY,MAA+C;CACzE,OAAO,YAAY,IAAI,CAAC,CAAC,MAAM,UAAU,KAAK,kBAAkB,CAAC,EAAE,CAAC;AACtE;AAEA,SAAS,YAAY,MAA+C;CAClE,MAAM,EAAE,KAAK,SAAS,QAAQ,UAAU,CAAC,GAAG,MAAM,WAAW,UAAU;CACvE,MAAM,YAAY,IAAI,aAAa,UAAU,OAAO;CACpD,OAAO,IAAI,SAAqB,SAAS,WAAW;EAClD,MAAM,MAAM,UAAU,QACpB;GACE,UAAU,IAAI;GACd,UAAU,IAAI;GACd,MAAM,IAAI,QA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KAAK,iBAAA;EACtB,MAAM,SAAS,KAAK,MAAM,SAAS;EACnC,IAAI,UAAU,GAAG;EACjB,KAAK,MAAM,OAAO,GAAG,MAAM;EAC3B,KAAK,WAAW;EAChB,MAAM,MAAM,KAAK,IAAI;EACrB,IAAI,MAAM,KAAK,gBAAgB,kBAAkB;GAC/C,aACE,GAAG,KAAK,KAAK,KAAK,iBAAiB,IAAI,aAAa,KAAK,QAAQ,cAAc,KAAK,YAAY,IAAI,MAAM,OAC5G;GACA,KAAK,UAAU;GACf,KAAK,eAAe;EACtB;CACF;AACF"}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
const
|
|
2
|
-
const require_internal_log = require(
|
|
1
|
+
const require_secret_config = require("./secret-config-CmK2wVkr.js");
|
|
2
|
+
const require_internal_log = require("./internal-log-By4Govmu.js");
|
|
3
3
|
let node_http = require("node:http");
|
|
4
|
-
node_http =
|
|
4
|
+
node_http = require_secret_config.__toESM(node_http);
|
|
5
5
|
let node_https = require("node:https");
|
|
6
|
-
node_https =
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
node_https = require_secret_config.__toESM(node_https);
|
|
7
|
+
// src/transports/batch-buffer.ts
|
|
8
|
+
/**
|
|
9
|
+
* Shared batching core for the network transports (OTLP, CloudWatch, GCP, Azure).
|
|
10
|
+
*
|
|
11
|
+
* - one send in flight at a time; flush() and close() join it instead of
|
|
12
|
+
* racing it, so close() cannot return while a request is still on the wire
|
|
13
|
+
* - a failed batch goes back to the front in its original order
|
|
14
|
+
* - 4xx responses other than 429 drop the batch with a warning instead of
|
|
15
|
+
* retrying a request the server will never accept
|
|
16
|
+
* - the buffer is capped; when full the oldest entries are dropped
|
|
17
|
+
*/
|
|
9
18
|
const DEFAULT_REQUEST_TIMEOUT_MS = 1e4;
|
|
10
19
|
const DEFAULT_MAX_BUFFER_SIZE = 1e4;
|
|
11
20
|
const WARN_INTERVAL_MS = 1e4;
|
|
@@ -25,6 +34,9 @@ function isPermanentHttpError(err) {
|
|
|
25
34
|
}
|
|
26
35
|
/** One request with a hard timeout. Rejects with HttpError on any non-2xx status. */
|
|
27
36
|
function httpRequest(opts) {
|
|
37
|
+
return sendRequest(opts).catch(require_secret_config.scrubbing(opts.secrets ?? (() => [])));
|
|
38
|
+
}
|
|
39
|
+
function sendRequest(opts) {
|
|
28
40
|
const { url, method = "POST", headers = {}, body, timeoutMs, label } = opts;
|
|
29
41
|
const transport = url.protocol === "http:" ? node_http : node_https;
|
|
30
42
|
return new Promise((resolve, reject) => {
|
|
@@ -102,6 +114,8 @@ var BatchBuffer = class {
|
|
|
102
114
|
await this.opts.send(batch);
|
|
103
115
|
this.failures = 0;
|
|
104
116
|
} catch (err) {
|
|
117
|
+
var _this$opts$secrets, _this$opts;
|
|
118
|
+
require_secret_config.scrubError(err, ((_this$opts$secrets = (_this$opts = this.opts).secrets) === null || _this$opts$secrets === void 0 ? void 0 : _this$opts$secrets.call(_this$opts)) ?? []);
|
|
105
119
|
if (!(this.opts.shouldRetry ? this.opts.shouldRetry(err) : !isPermanentHttpError(err))) {
|
|
106
120
|
require_internal_log.internalWarn(`${this.opts.name}: dropping ${batch.length} entr${batch.length === 1 ? "y" : "ies"} the server rejected (${err instanceof Error ? err.message : String(err)})`);
|
|
107
121
|
continue;
|
|
@@ -116,7 +130,7 @@ var BatchBuffer = class {
|
|
|
116
130
|
}
|
|
117
131
|
}
|
|
118
132
|
enforceCap() {
|
|
119
|
-
const max = this.opts.maxBufferSize ??
|
|
133
|
+
const max = this.opts.maxBufferSize ?? 1e4;
|
|
120
134
|
const excess = this.items.length - max;
|
|
121
135
|
if (excess <= 0) return;
|
|
122
136
|
this.items.splice(0, excess);
|
|
@@ -129,42 +143,41 @@ var BatchBuffer = class {
|
|
|
129
143
|
}
|
|
130
144
|
}
|
|
131
145
|
};
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
return BatchBuffer;
|
|
138
|
-
}
|
|
146
|
+
Object.defineProperty(exports, "BatchBuffer", {
|
|
147
|
+
enumerable: true,
|
|
148
|
+
get: function() {
|
|
149
|
+
return BatchBuffer;
|
|
150
|
+
}
|
|
139
151
|
});
|
|
140
|
-
Object.defineProperty(exports,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
152
|
+
Object.defineProperty(exports, "DEFAULT_MAX_BUFFER_SIZE", {
|
|
153
|
+
enumerable: true,
|
|
154
|
+
get: function() {
|
|
155
|
+
return DEFAULT_MAX_BUFFER_SIZE;
|
|
156
|
+
}
|
|
145
157
|
});
|
|
146
|
-
Object.defineProperty(exports,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
158
|
+
Object.defineProperty(exports, "DEFAULT_REQUEST_TIMEOUT_MS", {
|
|
159
|
+
enumerable: true,
|
|
160
|
+
get: function() {
|
|
161
|
+
return DEFAULT_REQUEST_TIMEOUT_MS;
|
|
162
|
+
}
|
|
151
163
|
});
|
|
152
|
-
Object.defineProperty(exports,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
164
|
+
Object.defineProperty(exports, "HttpError", {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function() {
|
|
167
|
+
return HttpError;
|
|
168
|
+
}
|
|
157
169
|
});
|
|
158
|
-
Object.defineProperty(exports,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
170
|
+
Object.defineProperty(exports, "httpRequest", {
|
|
171
|
+
enumerable: true,
|
|
172
|
+
get: function() {
|
|
173
|
+
return httpRequest;
|
|
174
|
+
}
|
|
163
175
|
});
|
|
164
|
-
Object.defineProperty(exports,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
176
|
+
Object.defineProperty(exports, "isPermanentHttpError", {
|
|
177
|
+
enumerable: true,
|
|
178
|
+
get: function() {
|
|
179
|
+
return isPermanentHttpError;
|
|
180
|
+
}
|
|
169
181
|
});
|
|
170
|
-
|
|
182
|
+
|
|
183
|
+
//# sourceMappingURL=batch-buffer-C7Am4Mw-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch-buffer-C7Am4Mw-.js","names":["scrubbing","http","https"],"sources":["../src/transports/batch-buffer.ts"],"sourcesContent":["/**\n * Shared batching core for the network transports (OTLP, CloudWatch, GCP, Azure).\n *\n * - one send in flight at a time; flush() and close() join it instead of\n * racing it, so close() cannot return while a request is still on the wire\n * - a failed batch goes back to the front in its original order\n * - 4xx responses other than 429 drop the batch with a warning instead of\n * retrying a request the server will never accept\n * - the buffer is capped; when full the oldest entries are dropped\n */\n\nimport * as http from 'node:http';\nimport * as https from 'node:https';\n\nimport { internalError, internalWarn } from '../utils/internal-log';\nimport { scrubbing, scrubError } from './secret-config';\n\nexport const DEFAULT_REQUEST_TIMEOUT_MS = 10_000;\nexport const DEFAULT_MAX_BUFFER_SIZE = 10_000;\nconst WARN_INTERVAL_MS = 10_000;\nconst MAX_ERROR_BODY = 500;\nconst MAX_BACKOFF_MS = 30_000;\n\nexport class HttpError extends Error {\n constructor(\n public readonly status: number,\n public readonly body: string,\n label: string\n ) {\n const detail = body ? `: ${body.slice(0, MAX_ERROR_BODY)}` : '';\n super(`${label} returned HTTP ${status}${detail}`);\n this.name = 'HttpError';\n }\n}\n\nexport function isPermanentHttpError(err: unknown): boolean {\n return err instanceof HttpError && err.status >= 400 && err.status < 500 && err.status !== 429;\n}\n\nexport interface HttpRequestOptions {\n url: URL;\n method?: string;\n headers?: Record<string, string>;\n body?: string;\n timeoutMs: number;\n label: string;\n /** Secret values to scrub from any error this request raises. URL userinfo is always scrubbed. */\n secrets?: () => (string | undefined)[];\n}\n\nexport interface HttpResult {\n status: number;\n body: string;\n}\n\n/** One request with a hard timeout. Rejects with HttpError on any non-2xx status. */\nexport function httpRequest(opts: HttpRequestOptions): Promise<HttpResult> {\n return sendRequest(opts).catch(scrubbing(opts.secrets ?? (() => [])));\n}\n\nfunction sendRequest(opts: HttpRequestOptions): Promise<HttpResult> {\n const { url, method = 'POST', headers = {}, body, timeoutMs, label } = opts;\n const transport = url.protocol === 'http:' ? http : https;\n return new Promise<HttpResult>((resolve, reject) => {\n const req = transport.request(\n {\n protocol: url.protocol,\n hostname: url.hostname,\n port: url.port || undefined,\n path: `${url.pathname}${url.search}`,\n method,\n headers:\n body === undefined ? headers : { ...headers, 'Content-Length': Buffer.byteLength(body) },\n },\n (res) => {\n let raw = '';\n res.on('data', (c: Buffer) => (raw += c.toString()));\n res.on('end', () => {\n const status = res.statusCode ?? 0;\n if (status >= 200 && status < 300) resolve({ status, body: raw });\n else reject(new HttpError(status, raw, label));\n });\n res.on('error', reject);\n }\n );\n req.setTimeout(timeoutMs, () => {\n req.destroy(new Error(`${label} timed out after ${timeoutMs}ms`));\n });\n req.on('error', reject);\n if (body !== undefined) req.write(body);\n req.end();\n });\n}\n\nexport interface BatchBufferOptions<T> {\n name: string;\n batchSize: number;\n maxBufferSize?: number;\n send: (items: T[]) => Promise<void>;\n /** Secret values to scrub from send errors before they are stored or logged. */\n secrets?: () => (string | undefined)[];\n /** Overrides the default drop-on-4xx rule. Return true to keep and retry the batch. */\n shouldRetry?: (err: unknown) => boolean;\n}\n\nexport class BatchBuffer<T> {\n private items: T[] = [];\n private inFlight: Promise<void> | undefined;\n private dropped = 0;\n private lastDropWarn = 0;\n private failures = 0;\n private retryAfter = 0;\n\n constructor(private readonly opts: BatchBufferOptions<T>) {}\n\n get length(): number {\n return this.items.length;\n }\n\n get batchSize(): number {\n return this.opts.batchSize;\n }\n\n push(item: T): void {\n this.items.push(item);\n this.enforceCap();\n }\n\n /** Threshold flush for write(): skipped while a send is running or the endpoint is backing off. */\n flushIfFull(): void {\n if (this.items.length < this.opts.batchSize || this.inFlight || Date.now() < this.retryAfter) {\n return;\n }\n this.flush().catch(() => {});\n }\n\n flush(): Promise<void> {\n if (!this.inFlight) {\n this.inFlight = this.drain().finally(() => {\n this.inFlight = undefined;\n });\n }\n return this.inFlight;\n }\n\n /** Flush up to `attempts` times, then report whatever is still undelivered. */\n async close(attempts = 3): Promise<void> {\n await this.inFlight;\n for (let i = 0; i < attempts && this.items.length > 0; i += 1) {\n await this.flush();\n }\n if (this.items.length > 0) {\n internalError(\n `${this.opts.name} closing with ${this.items.length} undelivered entr${this.items.length === 1 ? 'y' : 'ies'}`\n );\n }\n }\n\n private async drain(): Promise<void> {\n while (this.items.length > 0) {\n const batch = this.items.splice(0, this.opts.batchSize);\n try {\n await this.opts.send(batch);\n this.failures = 0;\n } catch (err) {\n scrubError(err, this.opts.secrets?.() ?? []);\n const retry = this.opts.shouldRetry\n ? this.opts.shouldRetry(err)\n : !isPermanentHttpError(err);\n if (!retry) {\n internalWarn(\n `${this.opts.name}: dropping ${batch.length} entr${batch.length === 1 ? 'y' : 'ies'} the server rejected (${err instanceof Error ? err.message : String(err)})`\n );\n continue;\n }\n internalError(`${this.opts.name} flush error`, err);\n this.items.unshift(...batch);\n this.enforceCap();\n this.failures += 1;\n this.retryAfter = Date.now() + Math.min(MAX_BACKOFF_MS, 1000 * 2 ** (this.failures - 1));\n return;\n }\n }\n }\n\n private enforceCap(): void {\n const max = this.opts.maxBufferSize ?? DEFAULT_MAX_BUFFER_SIZE;\n const excess = this.items.length - max;\n if (excess <= 0) return;\n this.items.splice(0, excess);\n this.dropped += excess;\n const now = Date.now();\n if (now - this.lastDropWarn >= WARN_INTERVAL_MS) {\n internalWarn(\n `${this.opts.name}: buffer full (${max}), dropped ${this.dropped} oldest entr${this.dropped === 1 ? 'y' : 'ies'}`\n );\n this.dropped = 0;\n this.lastDropWarn = now;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,MAAa,6BAA6B;AAC1C,MAAa,0BAA0B;AACvC,MAAM,mBAAmB;AACzB,MAAM,iBAAiB;AACvB,MAAM,iBAAiB;AAEvB,IAAa,YAAb,cAA+B,MAAM;CACnC,YACE,QACA,MACA,OACA;EACA,MAAM,SAAS,OAAO,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AAK;;IACZ,sBAAA,WAAW,OAAA,sBAAA,aAAK,KAAK,KAAA,CAAK,aAAA,QAAA,uBAAA,KAAA,IAAA,KAAA,IAAA,mBAAA,KAAA,UAAU,MAAK,CAAC,CAAC;IAI3C,IAAI,EAHU,KAAK,KAAK,cACpB,KAAK,KAAK,YAAY,GAAG,IACzB,CAAC,qBAAqB,GAAG,IACjB;KACV,qBAAA,aACE,GAAG,KAAK,KAAK,KAAK,aAAa,MAAM,OAAO,OAAO,MAAM,WAAW,IAAI,MAAM,MAAM,wBAAwB,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,EAAE,EAC/J;KACA;IACF;IACA,qBAAA,cAAc,GAAG,KAAK,KAAK,KAAK,eAAe,GAAG;IAClD,KAAK,MAAM,QAAQ,GAAG,KAAK;IAC3B,KAAK,WAAW;IAChB,KAAK,YAAY;IACjB,KAAK,aAAa,KAAK,IAAI,IAAI,KAAK,IAAI,gBAAgB,MAAO,MAAM,KAAK,WAAW,EAAE;IACvF;GACF;EACF;CACF;CAEA,aAA2B;EACzB,MAAM,MAAM,KAAK,KAAK,iBAAA;EACtB,MAAM,SAAS,KAAK,MAAM,SAAS;EACnC,IAAI,UAAU,GAAG;EACjB,KAAK,MAAM,OAAO,GAAG,MAAM;EAC3B,KAAK,WAAW;EAChB,MAAM,MAAM,KAAK,IAAI;EACrB,IAAI,MAAM,KAAK,gBAAgB,kBAAkB;GAC/C,qBAAA,aACE,GAAG,KAAK,KAAK,KAAK,iBAAiB,IAAI,aAAa,KAAK,QAAQ,cAAc,KAAK,YAAY,IAAI,MAAM,OAC5G;GACA,KAAK,UAAU;GACf,KAAK,eAAe;EACtB;CACF;AACF"}
|
package/dist/browser.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/utils/otel.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* logixia — OpenTelemetry auto trace-log correlation
|
|
4
3
|
*
|
|
@@ -75,7 +74,7 @@ interface OtelBridgeOptions {
|
|
|
75
74
|
* - No active span exists (root context)
|
|
76
75
|
* - The span context is invalid (all-zeros)
|
|
77
76
|
*/
|
|
78
|
-
declare function getActiveOtelContext(opts?: OtelBridgeOptions): OtelSpanContext | undefined;
|
|
77
|
+
export declare function getActiveOtelContext(opts?: OtelBridgeOptions): OtelSpanContext | undefined;
|
|
79
78
|
/**
|
|
80
79
|
* Returns a metadata object with OTel context fields ready to merge into a log call,
|
|
81
80
|
* using the configured field names.
|
|
@@ -90,7 +89,7 @@ declare function getActiveOtelContext(opts?: OtelBridgeOptions): OtelSpanContext
|
|
|
90
89
|
* });
|
|
91
90
|
* ```
|
|
92
91
|
*/
|
|
93
|
-
declare function getOtelMetaFields(opts?: OtelBridgeOptions): Record<string, unknown>;
|
|
92
|
+
export declare function getOtelMetaFields(opts?: OtelBridgeOptions): Record<string, unknown>;
|
|
94
93
|
/**
|
|
95
94
|
* Initialise the global OTel bridge.
|
|
96
95
|
*
|
|
@@ -104,13 +103,11 @@ declare function getOtelMetaFields(opts?: OtelBridgeOptions): Record<string, unk
|
|
|
104
103
|
* initOtelBridge();
|
|
105
104
|
* ```
|
|
106
105
|
*/
|
|
107
|
-
declare function initOtelBridge(opts?: OtelBridgeOptions): void;
|
|
106
|
+
export declare function initOtelBridge(opts?: OtelBridgeOptions): void;
|
|
108
107
|
/**
|
|
109
108
|
* Disable the OTel bridge (useful for tests).
|
|
110
109
|
*/
|
|
111
|
-
declare function disableOtelBridge(): void;
|
|
112
|
-
//#endregion
|
|
113
|
-
//#region src/utils/typed-logger.d.ts
|
|
110
|
+
export declare function disableOtelBridge(): void;
|
|
114
111
|
/**
|
|
115
112
|
* logixia — TypeScript typed log fields
|
|
116
113
|
*
|
|
@@ -159,8 +156,8 @@ interface LogFieldDef {
|
|
|
159
156
|
/** Custom validator — return a string to emit it as a warning message. */
|
|
160
157
|
validate?: (value: unknown) => string | undefined;
|
|
161
158
|
}
|
|
162
|
-
type LogSchema<TFields extends
|
|
163
|
-
interface CompiledSchema<TFields extends
|
|
159
|
+
type LogSchema<TFields extends object> = { [K in keyof TFields]: LogFieldDef; };
|
|
160
|
+
interface CompiledSchema<TFields extends object> {
|
|
164
161
|
readonly fields: LogSchema<TFields>;
|
|
165
162
|
/**
|
|
166
163
|
* Validate a payload against the schema.
|
|
@@ -175,7 +172,7 @@ interface CompiledSchema<TFields extends Record<string, unknown>> {
|
|
|
175
172
|
* Call this once at module initialisation and pass it to `createTypedLogger`.
|
|
176
173
|
* In development, every log call is validated against the schema.
|
|
177
174
|
*/
|
|
178
|
-
declare function defineLogSchema<TFields extends
|
|
175
|
+
export declare function defineLogSchema<TFields extends object>(fields: LogSchema<TFields>): CompiledSchema<TFields>;
|
|
179
176
|
/** IBaseLogger-compatible subset used by TypedLogger */
|
|
180
177
|
interface LoggerLike {
|
|
181
178
|
error(message: string | Error, data?: Record<string, unknown>): Promise<void>;
|
|
@@ -191,7 +188,7 @@ interface LoggerLike {
|
|
|
191
188
|
* The `error` overload still accepts a plain `Error` object as the first arg
|
|
192
189
|
* (with optional `TFields` data) so the typed logger remains a drop-in replacement.
|
|
193
190
|
*/
|
|
194
|
-
interface TypedLogger<TFields extends
|
|
191
|
+
interface TypedLogger<TFields extends object> {
|
|
195
192
|
error(error: Error, data?: Partial<TFields>): Promise<void>;
|
|
196
193
|
error(message: string, data?: Partial<TFields>): Promise<void>;
|
|
197
194
|
warn(message: string, data?: Partial<TFields>): Promise<void>;
|
|
@@ -208,9 +205,7 @@ interface TypedLogger<TFields extends Record<string, unknown>> {
|
|
|
208
205
|
* @param logger Any object that implements `IBaseLogger` (e.g. the result of `createLogger()`)
|
|
209
206
|
* @param schema Optional schema for dev-time validation. Created with `defineLogSchema()`.
|
|
210
207
|
*/
|
|
211
|
-
declare function createTypedLogger<TFields extends
|
|
212
|
-
//#endregion
|
|
213
|
-
//#region src/browser.d.ts
|
|
208
|
+
export declare function createTypedLogger<TFields extends object>(logger: LoggerLike, schema?: CompiledSchema<TFields>): TypedLogger<TFields>;
|
|
214
209
|
/**
|
|
215
210
|
* logixia — Browser / Edge Runtime entry point
|
|
216
211
|
*
|
|
@@ -246,8 +241,8 @@ declare function createTypedLogger<TFields extends Record<string, unknown>>(logg
|
|
|
246
241
|
* });
|
|
247
242
|
* ```
|
|
248
243
|
*/
|
|
249
|
-
type BrowserLogLevel = 'verbose' | 'debug' | 'info' | 'warn' | 'error' | 'critical';
|
|
250
|
-
interface BrowserLogEntry {
|
|
244
|
+
export type BrowserLogLevel = 'verbose' | 'debug' | 'info' | 'warn' | 'error' | 'critical';
|
|
245
|
+
export interface BrowserLogEntry {
|
|
251
246
|
timestamp: string;
|
|
252
247
|
level: BrowserLogLevel;
|
|
253
248
|
appName: string;
|
|
@@ -256,7 +251,7 @@ interface BrowserLogEntry {
|
|
|
256
251
|
traceId?: string;
|
|
257
252
|
context?: string;
|
|
258
253
|
}
|
|
259
|
-
interface BrowserLoggerConfig {
|
|
254
|
+
export interface BrowserLoggerConfig {
|
|
260
255
|
/** Application name shown in every log entry. @default 'App' */
|
|
261
256
|
appName?: string;
|
|
262
257
|
/** Minimum log level to emit. @default 'info' */
|
|
@@ -277,7 +272,7 @@ interface BrowserLoggerConfig {
|
|
|
277
272
|
/** Static context fields merged into every log entry. */
|
|
278
273
|
context?: Record<string, unknown>;
|
|
279
274
|
}
|
|
280
|
-
interface IBrowserTransport {
|
|
275
|
+
export interface IBrowserTransport {
|
|
281
276
|
name: string;
|
|
282
277
|
level?: BrowserLogLevel;
|
|
283
278
|
write(entry: BrowserLogEntry): void;
|
|
@@ -293,7 +288,7 @@ interface IBrowserTransport {
|
|
|
293
288
|
* In JSON mode:
|
|
294
289
|
* - Emits compact JSON strings via `console.log` / `console.error`
|
|
295
290
|
*/
|
|
296
|
-
declare class BrowserConsoleTransport implements IBrowserTransport {
|
|
291
|
+
export declare class BrowserConsoleTransport implements IBrowserTransport {
|
|
297
292
|
readonly name = "browser-console";
|
|
298
293
|
readonly level?: BrowserLogLevel;
|
|
299
294
|
private readonly json;
|
|
@@ -323,7 +318,7 @@ declare class BrowserConsoleTransport implements IBrowserTransport {
|
|
|
323
318
|
* });
|
|
324
319
|
* ```
|
|
325
320
|
*/
|
|
326
|
-
declare class BrowserRemoteTransport implements IBrowserTransport {
|
|
321
|
+
export declare class BrowserRemoteTransport implements IBrowserTransport {
|
|
327
322
|
readonly name = "browser-remote";
|
|
328
323
|
readonly level?: BrowserLogLevel;
|
|
329
324
|
private readonly url;
|
|
@@ -337,6 +332,12 @@ declare class BrowserRemoteTransport implements IBrowserTransport {
|
|
|
337
332
|
private lastFlushError;
|
|
338
333
|
private timer;
|
|
339
334
|
private droppedEntries;
|
|
335
|
+
private readonly silent;
|
|
336
|
+
private readonly onError;
|
|
337
|
+
private reporting;
|
|
338
|
+
private failureReported;
|
|
339
|
+
private lastReportAt;
|
|
340
|
+
private lastRecoveryAt;
|
|
340
341
|
constructor(options: {
|
|
341
342
|
/** Endpoint URL to POST batched log entries to. */
|
|
342
343
|
url: string;
|
|
@@ -356,6 +357,20 @@ declare class BrowserRemoteTransport implements IBrowserTransport {
|
|
|
356
357
|
*/
|
|
357
358
|
maxBufferSize?: number;
|
|
358
359
|
level?: BrowserLogLevel;
|
|
360
|
+
/**
|
|
361
|
+
* Suppress the console report of failed flushes (`onError` still fires).
|
|
362
|
+
* Defaults to `true` in real browser pages (so end users' consoles stay
|
|
363
|
+
* clean) and `false` elsewhere (edge runtimes, SSR, Node). Reports are
|
|
364
|
+
* throttled to one per minute and never include the URL or error text.
|
|
365
|
+
*/
|
|
366
|
+
silent?: boolean;
|
|
367
|
+
/**
|
|
368
|
+
* Called on every failed flush (network error or non-OK HTTP status) with the
|
|
369
|
+
* raw error. Runs inside the transport's re-entrancy guard: entries written
|
|
370
|
+
* to this transport from inside the callback are dropped (and counted in
|
|
371
|
+
* `dropped`). Route failures somewhere else.
|
|
372
|
+
*/
|
|
373
|
+
onError?: (error: unknown) => void;
|
|
359
374
|
});
|
|
360
375
|
/**
|
|
361
376
|
* Number of entries dropped without delivery — either because the buffer
|
|
@@ -363,14 +378,20 @@ declare class BrowserRemoteTransport implements IBrowserTransport {
|
|
|
363
378
|
* non-retryable HTTP status (a 4xx other than 429).
|
|
364
379
|
*/
|
|
365
380
|
get dropped(): number;
|
|
366
|
-
/** Number of flush attempts that failed
|
|
381
|
+
/** Number of flush attempts that failed (network error or non-OK HTTP status). */
|
|
367
382
|
get failedFlushes(): number;
|
|
368
|
-
/**
|
|
383
|
+
/**
|
|
384
|
+
* The most recent failure from a flush, if any: the raw fetch error (which on
|
|
385
|
+
* some runtimes embeds the request URL, so do not log it blindly) or an
|
|
386
|
+
* `Error` carrying only the HTTP status.
|
|
387
|
+
*/
|
|
369
388
|
get lastError(): unknown;
|
|
370
389
|
write(entry: BrowserLogEntry): void;
|
|
371
390
|
flush(): Promise<void>;
|
|
372
391
|
private send;
|
|
373
392
|
private recordFailure;
|
|
393
|
+
private reportRecovery;
|
|
394
|
+
private guarded;
|
|
374
395
|
private scheduleFlush;
|
|
375
396
|
/**
|
|
376
397
|
* Stop the flush timer and flush remaining entries. Without the final flush,
|
|
@@ -385,7 +406,7 @@ declare class BrowserRemoteTransport implements IBrowserTransport {
|
|
|
385
406
|
* Unlike the Node.js `LogixiaLogger`, this implementation has **zero**
|
|
386
407
|
* Node.js dependencies. It can be bundled for any runtime.
|
|
387
408
|
*/
|
|
388
|
-
declare class BrowserLogger {
|
|
409
|
+
export declare class BrowserLogger {
|
|
389
410
|
private readonly config;
|
|
390
411
|
private readonly transports;
|
|
391
412
|
constructor(config?: BrowserLoggerConfig);
|
|
@@ -420,7 +441,7 @@ declare class BrowserLogger {
|
|
|
420
441
|
* logger.info('Cart updated', { itemCount: 3, total: 49.99 });
|
|
421
442
|
* ```
|
|
422
443
|
*/
|
|
423
|
-
declare function createBrowserLogger(config?: BrowserLoggerConfig): BrowserLogger;
|
|
444
|
+
export declare function createBrowserLogger(config?: BrowserLoggerConfig): BrowserLogger;
|
|
424
445
|
/**
|
|
425
446
|
* Default browser logger instance (singleton, console transport, info level).
|
|
426
447
|
*
|
|
@@ -430,7 +451,6 @@ declare function createBrowserLogger(config?: BrowserLoggerConfig): BrowserLogge
|
|
|
430
451
|
* browserLogger.info('Hello from browser');
|
|
431
452
|
* ```
|
|
432
453
|
*/
|
|
433
|
-
declare const browserLogger: BrowserLogger;
|
|
434
|
-
|
|
435
|
-
export { BrowserConsoleTransport, BrowserLogEntry, BrowserLogLevel, BrowserLogger, BrowserLoggerConfig, BrowserRemoteTransport, type CompiledSchema, IBrowserTransport, type LogFieldDef, type LogFieldType, type LogSchema, type LoggerLike, type OtelBridgeOptions, type OtelSpanContext, type TypedLogger, browserLogger, createBrowserLogger, createTypedLogger, defineLogSchema, disableOtelBridge, getActiveOtelContext, getOtelMetaFields, initOtelBridge };
|
|
454
|
+
export declare const browserLogger: BrowserLogger;
|
|
455
|
+
export type { CompiledSchema, LogFieldDef, LogFieldType, LogSchema, LoggerLike, OtelBridgeOptions, OtelSpanContext, TypedLogger };
|
|
436
456
|
//# sourceMappingURL=browser.d.mts.map
|
package/dist/browser.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.mts","names":[],"sources":["../src/utils/otel.ts","../src/utils/typed-logger.ts","../src/browser.ts"],"
|
|
1
|
+
{"version":3,"file":"browser.d.mts","names":[],"sources":["../src/utils/otel.ts","../src/utils/typed-logger.ts","../src/browser.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAsCiB;;EAEf;;EAEA;;EAEA;;EAEA;;UAGe;;;;;EAKf;;;;;EAKA;;;;;EAKA;;;;;EAKA;;;;;;;;;;;wBA4Cc,qBAAqB,OAAM,oBAAyB;;;;;;;;;;;;;;;wBA0CpD,kBAAkB,OAAM,oBAAyB;;;;;;;;;;;;;;wBA8BjD,eAAe,OAAM;;;;wBAyCrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCrLJ;UAEK;EACf,MAAM;;EAE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