wardx 0.9.0 → 0.9.1
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 +2 -0
- package/package.json +2 -2
- package/src/transport/HttpTransport.js +4 -2
package/README.md
CHANGED
|
@@ -52,6 +52,8 @@ To receive frames, run an ingest server. Install `@wardx/server` and start it wi
|
|
|
52
52
|
- A measure call does not send network data.
|
|
53
53
|
- A measure call does not wait for a Promise.
|
|
54
54
|
- Delivery is at-most-once. If a sync fails, the SDK discards the batch.
|
|
55
|
+
- Pending physical frames are capped by `maxPendingFrames` (default: 32). On overflow, the oldest frames are discarded and counted in `wardx.internal.frames_failed`. This bounds the pending queue even while an HTTP request stalls; it is not a cap on total SDK memory.
|
|
56
|
+
- `httpTimeoutMs` bounds the entire HTTP request, including connection establishment and response reading.
|
|
55
57
|
- Physical frames are serialized, split to `maxFrameBytes`, and assigned consecutive sequence numbers. An individually oversized row is counted in `wardx.internal.frame_rows_dropped`.
|
|
56
58
|
- The application has priority over telemetry.
|
|
57
59
|
- Remote Config is always read from local memory.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wardx",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Node.js SDK for Wardx telemetry, Remote Config, and experiments.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wardx",
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"src"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@wardx/core": "0.9.
|
|
40
|
+
"@wardx/core": "0.9.1"
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -35,6 +35,7 @@ export function createHttpTransport({ endpoint, projectKey, httpTimeoutMs }) {
|
|
|
35
35
|
},
|
|
36
36
|
(res) => {
|
|
37
37
|
const chunks = [];
|
|
38
|
+
res.on('error', reject);
|
|
38
39
|
res.on('data', (chunk) => chunks.push(chunk));
|
|
39
40
|
res.on('end', () => {
|
|
40
41
|
const buf = Buffer.concat(chunks);
|
|
@@ -55,9 +56,10 @@ export function createHttpTransport({ endpoint, projectKey, httpTimeoutMs }) {
|
|
|
55
56
|
});
|
|
56
57
|
}
|
|
57
58
|
);
|
|
58
|
-
|
|
59
|
+
const deadline = setTimeout(() => {
|
|
59
60
|
req.destroy(new Error('wardx sync timed out'));
|
|
60
|
-
});
|
|
61
|
+
}, httpTimeoutMs);
|
|
62
|
+
req.once('close', () => clearTimeout(deadline));
|
|
61
63
|
req.on('error', reject);
|
|
62
64
|
req.write(gzippedBody);
|
|
63
65
|
req.end();
|