posthog-node 5.74.0 → 6.0.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/MIGRATION.md +556 -0
- package/README.md +3 -1
- package/dist/ai-capture/routing.d.ts +0 -3
- package/dist/ai-capture/routing.d.ts.map +1 -1
- package/dist/ai-capture/routing.js +2 -14
- package/dist/ai-capture/routing.mjs +1 -4
- package/dist/capture-lane/lane.d.ts +109 -0
- package/dist/capture-lane/lane.d.ts.map +1 -0
- package/dist/capture-lane/lane.js +308 -0
- package/dist/capture-lane/lane.mjs +270 -0
- package/dist/capture-lane/limits.d.ts +7 -0
- package/dist/capture-lane/limits.d.ts.map +1 -0
- package/dist/{capture-v1/config.js → capture-lane/limits.js} +13 -11
- package/dist/capture-lane/limits.mjs +4 -0
- package/dist/capture-lane/settings.d.ts +30 -0
- package/dist/capture-lane/settings.d.ts.map +1 -0
- package/dist/capture-lane/settings.js +100 -0
- package/dist/capture-lane/settings.mjs +47 -0
- package/dist/capture-v1/compression.d.ts +18 -0
- package/dist/capture-v1/compression.d.ts.map +1 -0
- package/dist/capture-v1/compression.js +70 -0
- package/dist/capture-v1/compression.mjs +26 -0
- package/dist/capture-v1/errors.d.ts +23 -7
- package/dist/capture-v1/errors.d.ts.map +1 -1
- package/dist/capture-v1/errors.js +37 -8
- package/dist/capture-v1/errors.mjs +29 -6
- package/dist/capture-v1/sender.d.ts +63 -23
- package/dist/capture-v1/sender.d.ts.map +1 -1
- package/dist/capture-v1/sender.js +281 -74
- package/dist/capture-v1/sender.mjs +275 -77
- package/dist/capture-v1/serialize.d.ts +28 -0
- package/dist/capture-v1/serialize.d.ts.map +1 -0
- package/dist/capture-v1/serialize.js +82 -0
- package/dist/capture-v1/serialize.mjs +38 -0
- package/dist/capture-v1/transform.d.ts +10 -25
- package/dist/capture-v1/transform.d.ts.map +1 -1
- package/dist/capture-v1/transform.js +33 -64
- package/dist/capture-v1/transform.mjs +28 -53
- package/dist/capture-v1/types.d.ts +16 -14
- package/dist/capture-v1/types.d.ts.map +1 -1
- package/dist/capture-v1/types.js +27 -1
- package/dist/capture-v1/types.mjs +3 -1
- package/dist/capture-v1/uuid.d.ts +9 -0
- package/dist/capture-v1/uuid.d.ts.map +1 -0
- package/dist/capture-v1/uuid.js +75 -0
- package/dist/capture-v1/uuid.mjs +34 -0
- package/dist/client.d.ts +203 -96
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +456 -228
- package/dist/client.mjs +455 -227
- package/dist/compression.node.d.ts +13 -0
- package/dist/compression.node.d.ts.map +1 -0
- package/dist/{capture-v1/routing.js → compression.node.js} +23 -16
- package/dist/compression.node.mjs +18 -0
- package/dist/entrypoints/index.node.d.ts +2 -0
- package/dist/entrypoints/index.node.d.ts.map +1 -1
- package/dist/entrypoints/index.node.js +11 -4
- package/dist/entrypoints/index.node.mjs +4 -0
- package/dist/event-defaults.d.ts +46 -0
- package/dist/event-defaults.d.ts.map +1 -0
- package/dist/event-defaults.js +141 -0
- package/dist/event-defaults.mjs +79 -0
- package/dist/exports.d.ts +3 -0
- package/dist/exports.d.ts.map +1 -1
- package/dist/exports.js +22 -11
- package/dist/exports.mjs +1 -0
- package/dist/extensions/context/context.d.ts +0 -1
- package/dist/extensions/context/context.d.ts.map +1 -1
- package/dist/extensions/context/context.js +4 -3
- package/dist/extensions/context/context.mjs +4 -3
- package/dist/extensions/context/event-context.d.ts.map +1 -1
- package/dist/extensions/context/event-context.js +3 -0
- package/dist/extensions/context/event-context.mjs +3 -0
- package/dist/extensions/context/types.d.ts +9 -1
- package/dist/extensions/context/types.d.ts.map +1 -1
- package/dist/extensions/error-tracking/index.d.ts +1 -1
- package/dist/extensions/error-tracking/index.d.ts.map +1 -1
- package/dist/extensions/error-tracking/index.js +71 -7
- package/dist/extensions/error-tracking/index.mjs +75 -11
- package/dist/extensions/express.d.ts +8 -0
- package/dist/extensions/express.d.ts.map +1 -1
- package/dist/extensions/express.js +3 -3
- package/dist/extensions/express.mjs +4 -4
- package/dist/extensions/fetch-request.d.ts.map +1 -1
- package/dist/extensions/fetch-request.js +2 -2
- package/dist/extensions/fetch-request.mjs +3 -3
- package/dist/extensions/nestjs.d.ts.map +1 -1
- package/dist/extensions/nestjs.js +7 -4
- package/dist/extensions/nestjs.mjs +8 -5
- package/dist/extensions/tracing-headers.d.ts +7 -0
- package/dist/extensions/tracing-headers.d.ts.map +1 -1
- package/dist/extensions/tracing-headers.js +11 -1
- package/dist/extensions/tracing-headers.mjs +9 -2
- package/dist/flag-events.d.ts +1 -1
- package/dist/flag-events.d.ts.map +1 -1
- package/dist/flag-events.js +2 -2
- package/dist/flag-events.mjs +2 -2
- package/dist/types.d.ts +191 -27
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +3 -2
- package/src/ai-capture/routing.ts +0 -6
- package/src/capture-lane/lane.ts +414 -0
- package/src/capture-lane/limits.ts +8 -0
- package/src/capture-lane/settings.ts +119 -0
- package/src/capture-v1/compression.ts +50 -0
- package/src/capture-v1/errors.ts +50 -11
- package/src/capture-v1/sender.ts +405 -111
- package/src/capture-v1/serialize.ts +77 -0
- package/src/capture-v1/transform.ts +59 -92
- package/src/capture-v1/types.ts +19 -15
- package/src/capture-v1/uuid.ts +53 -0
- package/src/client.ts +847 -424
- package/src/compression.node.ts +30 -0
- package/src/entrypoints/index.node.ts +6 -0
- package/src/event-defaults.ts +177 -0
- package/src/exports.ts +3 -0
- package/src/extensions/context/context.ts +4 -4
- package/src/extensions/context/event-context.ts +3 -1
- package/src/extensions/context/types.ts +10 -1
- package/src/extensions/error-tracking/index.ts +51 -7
- package/src/extensions/express.ts +12 -3
- package/src/extensions/fetch-request.ts +7 -3
- package/src/extensions/nestjs.ts +9 -5
- package/src/extensions/tracing-headers.ts +26 -7
- package/src/flag-events.ts +5 -2
- package/src/types.ts +211 -44
- package/src/version.ts +1 -1
- package/dist/ai-capture/batching.d.ts +0 -11
- package/dist/ai-capture/batching.d.ts.map +0 -1
- package/dist/ai-capture/batching.js +0 -77
- package/dist/ai-capture/batching.mjs +0 -36
- package/dist/capture-v1/config.d.ts +0 -11
- package/dist/capture-v1/config.d.ts.map +0 -1
- package/dist/capture-v1/config.mjs +0 -8
- package/dist/capture-v1/routing.d.ts +0 -21
- package/dist/capture-v1/routing.d.ts.map +0 -1
- package/dist/capture-v1/routing.mjs +0 -7
- package/src/ai-capture/batching.ts +0 -47
- package/src/capture-v1/config.ts +0 -18
- package/src/capture-v1/routing.ts +0 -28
|
@@ -1,56 +1,91 @@
|
|
|
1
|
-
import { type FetchLike
|
|
1
|
+
import { type FetchLike } from '@posthog/core';
|
|
2
|
+
import { type CaptureCodec, type CaptureCompression } from './compression';
|
|
3
|
+
import { CaptureError } from './errors';
|
|
4
|
+
import { type SerializedV1Event } from './serialize';
|
|
5
|
+
import type { CaptureEndpoint } from './types';
|
|
6
|
+
/** Wait before the first retry; each later retry doubles it. */
|
|
7
|
+
export declare const RETRY_BASE_DELAY_MS = 100;
|
|
8
|
+
/** Ceiling for every retry wait, including one raised by `Retry-After`. */
|
|
9
|
+
export declare const MAX_RETRY_DELAY_MS = 30000;
|
|
10
|
+
/** Drop details for a copy of an event the server dropped as a duplicate of an earlier one in the request. */
|
|
11
|
+
export declare const DUPLICATE_EVENT_UUID = "duplicate_event_uuid";
|
|
2
12
|
export interface V1CaptureSenderConfig {
|
|
3
13
|
host: string;
|
|
14
|
+
/** The capture lane this sender posts to. */
|
|
15
|
+
path: CaptureEndpoint;
|
|
4
16
|
apiKey: string;
|
|
5
|
-
/**
|
|
17
|
+
/** The `PostHog-Sdk-Info` library name. PostHog fills `$lib` from it only for an event that has no `$lib`. */
|
|
6
18
|
libraryId: string;
|
|
7
19
|
libraryVersion: string;
|
|
8
20
|
/** Value for the `User-Agent` header, if the runtime allows setting it. */
|
|
9
21
|
userAgent?: string;
|
|
10
22
|
historicalMigration: boolean;
|
|
11
|
-
/**
|
|
12
|
-
|
|
23
|
+
/** The body encoding; a body that fails to compress is sent uncompressed. */
|
|
24
|
+
compression: CaptureCompression;
|
|
13
25
|
requestTimeoutMs: number;
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
/** Base exponential backoff, doubled each retry and capped at `maxBackoffMs`. */
|
|
17
|
-
initialRetryDelayMs: number;
|
|
18
|
-
/** Single ceiling for both the backoff schedule and the `Retry-After` clamp. */
|
|
19
|
-
maxBackoffMs?: number;
|
|
26
|
+
/** Retries after the first attempt. */
|
|
27
|
+
maxRetries: number;
|
|
20
28
|
isDebug?: boolean;
|
|
21
29
|
}
|
|
22
30
|
export interface V1CaptureSenderHooks {
|
|
23
31
|
fetch: FetchLike;
|
|
24
|
-
/**
|
|
25
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Surfaces partial/terminal delivery failures on the client error channel, at most once per
|
|
34
|
+
* batch. `summary` is one line with counts and causes only, for when nothing listens.
|
|
35
|
+
*/
|
|
36
|
+
onError: (error: CaptureError, summary: string) => void;
|
|
26
37
|
now?: () => number;
|
|
27
|
-
|
|
38
|
+
/** Waits between attempts. The sender stops waiting when `signal` aborts, even if this does not. */
|
|
39
|
+
sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
|
|
28
40
|
generateRequestId?: () => string;
|
|
29
|
-
|
|
41
|
+
/** Uniform in [0, 1); sets the jitter of each retry wait. */
|
|
42
|
+
random?: () => number;
|
|
43
|
+
compress?: (payload: string, codec: CaptureCodec) => Promise<Uint8Array | null>;
|
|
44
|
+
}
|
|
45
|
+
export interface V1SendOptions {
|
|
46
|
+
/** Aborting stops the current attempt and every later one; the pending events come back as unsent. */
|
|
47
|
+
signal?: AbortSignal;
|
|
48
|
+
/**
|
|
49
|
+
* When true, events whose last attempt got no HTTP response (or were cut off by `signal`) are
|
|
50
|
+
* returned to the caller unreported, so it can queue them again. When false they are reported
|
|
51
|
+
* as undelivered.
|
|
52
|
+
*/
|
|
53
|
+
keepUnsent?: boolean;
|
|
30
54
|
}
|
|
31
55
|
/**
|
|
32
|
-
* Sends already-
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
56
|
+
* Sends already-serialized events to one Capture V1 lane (`config.path`),
|
|
57
|
+
* owning the full attempt loop: per-event partial retry, exponential backoff
|
|
58
|
+
* clamped against `Retry-After`, v1 status classification, and surfacing drops
|
|
59
|
+
* / undelivered events on the error channel. Used by both the batched and
|
|
60
|
+
* immediate send paths.
|
|
37
61
|
*
|
|
38
62
|
* Never throws for a handled outcome: after exhausting its own attempt budget it
|
|
39
|
-
* reports the failure via `onError` and resolves
|
|
40
|
-
*
|
|
63
|
+
* reports the failure via `onError` and resolves. Only events that never got an
|
|
64
|
+
* HTTP response can come back to the caller, and only with `keepUnsent`.
|
|
41
65
|
*/
|
|
42
66
|
export declare class V1CaptureSender {
|
|
43
67
|
private readonly config;
|
|
44
|
-
private readonly
|
|
68
|
+
private readonly hostOrigin;
|
|
45
69
|
private readonly fetchFn;
|
|
46
70
|
private readonly onError;
|
|
47
71
|
private readonly now;
|
|
48
72
|
private readonly sleep;
|
|
49
73
|
private readonly generateRequestId;
|
|
74
|
+
private readonly random;
|
|
50
75
|
private readonly compress;
|
|
51
76
|
constructor(config: V1CaptureSenderConfig, hooks: V1CaptureSenderHooks);
|
|
52
|
-
|
|
77
|
+
/** Sends `events` and resolves with the ones to queue again (always empty unless `keepUnsent`). */
|
|
78
|
+
send<T extends SerializedV1Event>(events: T[], options?: V1SendOptions): Promise<T[]>;
|
|
79
|
+
private sleepUnlessAborted;
|
|
53
80
|
private sendOnce;
|
|
81
|
+
/**
|
|
82
|
+
* Sends with `redirect: 'manual'` and follows 307 and 308 to the configured host's origin, at most
|
|
83
|
+
* `MAX_REDIRECTS` times, with the same method, headers and body. A fetch that follows redirects
|
|
84
|
+
* itself still works: its final response is not a redirect.
|
|
85
|
+
*/
|
|
86
|
+
private fetchFollowingRedirects;
|
|
87
|
+
/** Compresses `payload` with the configured codec and sets `Content-Encoding` to match. */
|
|
88
|
+
private encodeBody;
|
|
54
89
|
private buildHeaders;
|
|
55
90
|
/**
|
|
56
91
|
* Partition the pending events against a 2xx result map: `drop` accumulates as
|
|
@@ -58,6 +93,7 @@ export declare class V1CaptureSender {
|
|
|
58
93
|
* `ok`/`warning`/unknown/absent are terminal successes.
|
|
59
94
|
*/
|
|
60
95
|
private classify;
|
|
96
|
+
/** The wait after failed attempt `attempt` (1-based): jittered exponential backoff, raised to `Retry-After`. */
|
|
61
97
|
private backoffDelay;
|
|
62
98
|
/** Parse `Retry-After` (delta-seconds or HTTP-date). Non-positive/past values are ignored. */
|
|
63
99
|
private parseRetryAfter;
|
|
@@ -65,6 +101,10 @@ export declare class V1CaptureSender {
|
|
|
65
101
|
private buildHttpError;
|
|
66
102
|
private surfaceBatchFailure;
|
|
67
103
|
private surfacePartialDrops;
|
|
104
|
+
private report;
|
|
105
|
+
/** A failure without an HTTP response, named by type only: its message can carry server or proxy text. */
|
|
106
|
+
private describeTransportFailure;
|
|
107
|
+
private captureError;
|
|
68
108
|
private cancelBody;
|
|
69
109
|
}
|
|
70
110
|
//# sourceMappingURL=sender.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sender.d.ts","sourceRoot":"","sources":["../../src/capture-v1/sender.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"sender.d.ts","sourceRoot":"","sources":["../../src/capture-v1/sender.ts"],"names":[],"mappings":"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"}
|
|
@@ -28,13 +28,57 @@ var __webpack_require__ = {};
|
|
|
28
28
|
var __webpack_exports__ = {};
|
|
29
29
|
__webpack_require__.r(__webpack_exports__);
|
|
30
30
|
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
DUPLICATE_EVENT_UUID: ()=>DUPLICATE_EVENT_UUID,
|
|
32
|
+
MAX_RETRY_DELAY_MS: ()=>MAX_RETRY_DELAY_MS,
|
|
33
|
+
RETRY_BASE_DELAY_MS: ()=>RETRY_BASE_DELAY_MS,
|
|
31
34
|
V1CaptureSender: ()=>V1CaptureSender
|
|
32
35
|
});
|
|
33
36
|
const core_namespaceObject = require("@posthog/core");
|
|
37
|
+
const external_compression_js_namespaceObject = require("./compression.js");
|
|
34
38
|
const external_errors_js_namespaceObject = require("./errors.js");
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
39
|
+
const external_serialize_js_namespaceObject = require("./serialize.js");
|
|
40
|
+
const external_uuid_js_namespaceObject = require("./uuid.js");
|
|
41
|
+
const RETRY_BASE_DELAY_MS = 100;
|
|
42
|
+
const MAX_RETRY_DELAY_MS = 30000;
|
|
43
|
+
async function raceAbort(work, signal) {
|
|
44
|
+
if (!signal) return work;
|
|
45
|
+
let onAbort;
|
|
46
|
+
const aborted = new Promise((_resolve, reject)=>{
|
|
47
|
+
onAbort = ()=>{
|
|
48
|
+
const abortError = new Error('Capture V1 request aborted while compressing the body');
|
|
49
|
+
abortError.name = 'AbortError';
|
|
50
|
+
abortError.cause = signal.reason;
|
|
51
|
+
reject(abortError);
|
|
52
|
+
};
|
|
53
|
+
if (signal.aborted) onAbort();
|
|
54
|
+
else signal.addEventListener('abort', onAbort, {
|
|
55
|
+
once: true
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
try {
|
|
59
|
+
return await Promise.race([
|
|
60
|
+
work,
|
|
61
|
+
aborted
|
|
62
|
+
]);
|
|
63
|
+
} finally{
|
|
64
|
+
signal.removeEventListener('abort', onAbort);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function abortableSleep(ms, signal) {
|
|
68
|
+
return new Promise((resolve)=>{
|
|
69
|
+
const onAbort = ()=>{
|
|
70
|
+
clearTimeout(timer);
|
|
71
|
+
resolve();
|
|
72
|
+
};
|
|
73
|
+
const timer = setTimeout(()=>{
|
|
74
|
+
signal?.removeEventListener('abort', onAbort);
|
|
75
|
+
resolve();
|
|
76
|
+
}, ms);
|
|
77
|
+
signal?.addEventListener('abort', onAbort, {
|
|
78
|
+
once: true
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
}
|
|
38
82
|
const RETRYABLE_STATUSES = new Set([
|
|
39
83
|
404,
|
|
40
84
|
408,
|
|
@@ -44,114 +88,176 @@ const RETRYABLE_STATUSES = new Set([
|
|
|
44
88
|
503,
|
|
45
89
|
504
|
|
46
90
|
]);
|
|
91
|
+
const FOLLOWED_REDIRECT_STATUSES = new Set([
|
|
92
|
+
307,
|
|
93
|
+
308
|
|
94
|
+
]);
|
|
95
|
+
const MAX_REDIRECTS = 5;
|
|
96
|
+
const timeoutErrors = new WeakSet();
|
|
97
|
+
const DUPLICATE_EVENT_UUID = 'duplicate_event_uuid';
|
|
47
98
|
class V1CaptureSender {
|
|
48
99
|
constructor(config, hooks){
|
|
49
100
|
this.config = config;
|
|
50
|
-
this.
|
|
101
|
+
this.hostOrigin = originOf(config.host);
|
|
51
102
|
this.fetchFn = hooks.fetch;
|
|
52
103
|
this.onError = hooks.onError;
|
|
53
104
|
this.now = hooks.now ?? Date.now;
|
|
54
|
-
this.sleep = hooks.sleep ??
|
|
105
|
+
this.sleep = hooks.sleep ?? abortableSleep;
|
|
55
106
|
this.generateRequestId = hooks.generateRequestId ?? core_namespaceObject.uuidv7;
|
|
56
|
-
this.
|
|
107
|
+
this.random = hooks.random ?? Math.random;
|
|
108
|
+
this.compress = hooks.compress ?? external_compression_js_namespaceObject.webCompressor.compress;
|
|
57
109
|
}
|
|
58
|
-
async
|
|
59
|
-
if (0 ===
|
|
110
|
+
async send(events, options = {}) {
|
|
111
|
+
if (0 === events.length) return [];
|
|
112
|
+
const { signal, keepUnsent = false } = options;
|
|
60
113
|
const requestId = this.generateRequestId();
|
|
61
114
|
const createdAt = new Date(this.now()).toISOString();
|
|
62
|
-
const
|
|
63
|
-
createdAt,
|
|
64
|
-
historicalMigration: this.config.historicalMigration
|
|
65
|
-
});
|
|
66
|
-
const url = `${this.config.host}${V1_ANALYTICS_PATH}`;
|
|
115
|
+
const url = `${this.config.host}${this.config.path}`;
|
|
67
116
|
const drops = [];
|
|
68
|
-
|
|
69
|
-
|
|
117
|
+
const loss = new external_errors_js_namespaceObject.CaptureLossTally();
|
|
118
|
+
let pending = events;
|
|
119
|
+
const unsent = (cause, failure)=>{
|
|
120
|
+
if (keepUnsent) {
|
|
121
|
+
this.surfacePartialDrops(requestId, drops, loss);
|
|
122
|
+
return pending;
|
|
123
|
+
}
|
|
124
|
+
this.surfaceBatchFailure(requestId, drops, pending, cause, loss, failure);
|
|
125
|
+
return [];
|
|
126
|
+
};
|
|
127
|
+
const { maxRetries } = this.config;
|
|
128
|
+
const maxAttempts = (Number.isInteger(maxRetries) && maxRetries > 0 ? maxRetries : 0) + 1;
|
|
70
129
|
for(let attempt = 1; attempt <= maxAttempts; attempt++){
|
|
130
|
+
if (signal?.aborted) return unsent(signal.reason, 'not sent: aborted');
|
|
71
131
|
const isLastAttempt = attempt === maxAttempts;
|
|
72
|
-
const payload = (0,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
historical_migration: true
|
|
76
|
-
} : {},
|
|
77
|
-
batch: pending
|
|
132
|
+
const payload = (0, external_serialize_js_namespaceObject.buildV1Body)(pending, {
|
|
133
|
+
createdAt,
|
|
134
|
+
historicalMigration: this.config.historicalMigration
|
|
78
135
|
});
|
|
79
136
|
let captureAttempt;
|
|
80
137
|
let retryDelayMs;
|
|
81
138
|
try {
|
|
82
|
-
captureAttempt = await this.sendOnce(url, payload, attempt, requestId);
|
|
83
|
-
const { response, signal } = captureAttempt;
|
|
139
|
+
captureAttempt = await this.sendOnce(url, payload, attempt, requestId, signal);
|
|
140
|
+
const { response, signal: attemptSignal, redirectFailure } = captureAttempt;
|
|
84
141
|
const { status } = response;
|
|
142
|
+
if (void 0 !== redirectFailure) {
|
|
143
|
+
await captureAttempt.waitFor(captureAttempt.cancelBody()).catch(()=>{});
|
|
144
|
+
const failure = `failed on a redirect it does not follow (HTTP ${status})`;
|
|
145
|
+
this.surfaceBatchFailure(requestId, drops, pending, new Error(redirectFailure), loss, failure);
|
|
146
|
+
return [];
|
|
147
|
+
}
|
|
85
148
|
if (status < 200 || status >= 300) if (!isLastAttempt && RETRYABLE_STATUSES.has(status)) {
|
|
86
149
|
const retryAfterMs = this.parseRetryAfter(response);
|
|
87
150
|
await captureAttempt.waitFor(captureAttempt.cancelBody()).catch(()=>{});
|
|
88
151
|
retryDelayMs = this.backoffDelay(attempt, retryAfterMs);
|
|
89
152
|
} else {
|
|
90
153
|
const httpError = await this.buildHttpError(response, status, captureAttempt.waitFor);
|
|
91
|
-
|
|
154
|
+
this.surfaceBatchFailure(requestId, drops, pending, httpError, loss, `failed with HTTP ${status}`);
|
|
155
|
+
return [];
|
|
92
156
|
}
|
|
93
157
|
else {
|
|
94
158
|
let parsed;
|
|
95
159
|
try {
|
|
96
160
|
parsed = await captureAttempt.waitFor(this.parseResponse(response));
|
|
97
161
|
} catch (error) {
|
|
98
|
-
if (
|
|
99
|
-
|
|
162
|
+
if (attemptSignal.aborted) throw error;
|
|
163
|
+
this.surfaceBatchFailure(requestId, drops, pending, new Error(`Capture V1 returned an unparseable ${status} response body`), loss, `failed with an unreadable response (HTTP ${status})`);
|
|
164
|
+
return [];
|
|
100
165
|
}
|
|
166
|
+
const dropsBefore = drops.length;
|
|
101
167
|
const retryable = this.classify(pending, parsed, drops);
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
168
|
+
for (const drop of drops.slice(dropsBefore)){
|
|
169
|
+
const cause = drop.details === DUPLICATE_EVENT_UUID ? 'dropped as duplicate uuids' : 'dropped by the server';
|
|
170
|
+
loss.add(`${cause} (HTTP ${status})`, 1);
|
|
171
|
+
}
|
|
172
|
+
if (0 === retryable.length) {
|
|
173
|
+
this.surfacePartialDrops(requestId, drops, loss);
|
|
174
|
+
return [];
|
|
175
|
+
}
|
|
176
|
+
if (isLastAttempt) {
|
|
177
|
+
loss.add(`still marked for retry after ${maxAttempts} attempt(s) (HTTP ${status})`, retryable.length);
|
|
178
|
+
this.report(this.captureError({
|
|
179
|
+
requestId,
|
|
180
|
+
drops,
|
|
181
|
+
retryExhausted: retryable.map((event)=>event.uuid)
|
|
182
|
+
}), loss);
|
|
183
|
+
return [];
|
|
184
|
+
}
|
|
108
185
|
pending = retryable;
|
|
109
186
|
const retryAfterMs = this.parseRetryAfter(response);
|
|
110
187
|
retryDelayMs = this.backoffDelay(attempt, retryAfterMs);
|
|
111
188
|
}
|
|
112
189
|
} catch (transportError) {
|
|
113
190
|
if (captureAttempt && !captureAttempt.signal.aborted) throw transportError;
|
|
114
|
-
if (isLastAttempt) return this.
|
|
191
|
+
if (isLastAttempt || signal?.aborted) return unsent(transportError, this.describeTransportFailure(transportError, signal));
|
|
115
192
|
retryDelayMs = this.backoffDelay(attempt);
|
|
116
193
|
} finally{
|
|
117
194
|
captureAttempt?.cleanup();
|
|
118
195
|
}
|
|
119
|
-
if (void 0 !== retryDelayMs) await this.
|
|
196
|
+
if (void 0 !== retryDelayMs) await this.sleepUnlessAborted(retryDelayMs, signal);
|
|
120
197
|
}
|
|
198
|
+
return [];
|
|
121
199
|
}
|
|
122
|
-
async
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
200
|
+
async sleepUnlessAborted(ms, signal) {
|
|
201
|
+
if (!signal) return this.sleep(ms);
|
|
202
|
+
if (signal.aborted) return;
|
|
203
|
+
let onAbort;
|
|
204
|
+
const aborted = new Promise((resolve)=>{
|
|
205
|
+
onAbort = resolve;
|
|
206
|
+
signal.addEventListener('abort', onAbort, {
|
|
207
|
+
once: true
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
try {
|
|
211
|
+
await Promise.race([
|
|
212
|
+
this.sleep(ms, signal),
|
|
213
|
+
aborted
|
|
214
|
+
]);
|
|
215
|
+
} finally{
|
|
216
|
+
signal.removeEventListener('abort', onAbort);
|
|
131
217
|
}
|
|
218
|
+
}
|
|
219
|
+
async sendOnce(url, payload, attempt, requestId, externalSignal) {
|
|
220
|
+
const headers = this.buildHeaders(attempt, requestId);
|
|
221
|
+
const body = await raceAbort(this.encodeBody(payload, headers), externalSignal);
|
|
132
222
|
const controller = new AbortController();
|
|
133
223
|
let timeoutPhase = 'waiting for response headers';
|
|
134
224
|
let timer;
|
|
225
|
+
let onExternalAbort;
|
|
226
|
+
const stopListening = ()=>{
|
|
227
|
+
if (onExternalAbort) externalSignal?.removeEventListener('abort', onExternalAbort);
|
|
228
|
+
};
|
|
135
229
|
const deadline = new Promise((_resolve, reject)=>{
|
|
136
|
-
|
|
230
|
+
const abortWith = (error)=>{
|
|
231
|
+
reject(error);
|
|
232
|
+
controller.abort(error);
|
|
233
|
+
};
|
|
234
|
+
timer = setTimeout(()=>{
|
|
137
235
|
const timeoutError = new Error(`Capture V1 request timed out ${timeoutPhase} after ${this.config.requestTimeoutMs}ms`);
|
|
138
236
|
timeoutError.name = 'AbortError';
|
|
139
|
-
|
|
140
|
-
|
|
237
|
+
timeoutErrors.add(timeoutError);
|
|
238
|
+
abortWith(timeoutError);
|
|
141
239
|
}, this.config.requestTimeoutMs);
|
|
240
|
+
if (externalSignal) {
|
|
241
|
+
onExternalAbort = ()=>{
|
|
242
|
+
const abortError = new Error(`Capture V1 request aborted ${timeoutPhase}`);
|
|
243
|
+
abortError.name = 'AbortError';
|
|
244
|
+
abortError.cause = externalSignal.reason;
|
|
245
|
+
abortWith(abortError);
|
|
246
|
+
};
|
|
247
|
+
if (externalSignal.aborted) onExternalAbort();
|
|
248
|
+
else externalSignal.addEventListener('abort', onExternalAbort, {
|
|
249
|
+
once: true
|
|
250
|
+
});
|
|
251
|
+
}
|
|
142
252
|
});
|
|
253
|
+
deadline.catch(()=>{});
|
|
143
254
|
try {
|
|
144
|
-
const fetchPromise = this.
|
|
145
|
-
method: 'POST',
|
|
146
|
-
headers,
|
|
147
|
-
body,
|
|
148
|
-
signal: controller.signal
|
|
149
|
-
});
|
|
255
|
+
const fetchPromise = this.fetchFollowingRedirects(url, headers, body, controller.signal);
|
|
150
256
|
let responseAccepted = false;
|
|
151
|
-
fetchPromise.then((
|
|
152
|
-
if (controller.signal.aborted && !responseAccepted) this.cancelBody(
|
|
257
|
+
fetchPromise.then((late)=>{
|
|
258
|
+
if (controller.signal.aborted && !responseAccepted) this.cancelBody(late.response);
|
|
153
259
|
}).catch(()=>{});
|
|
154
|
-
const response = await Promise.race([
|
|
260
|
+
const { response, redirectFailure } = await Promise.race([
|
|
155
261
|
fetchPromise,
|
|
156
262
|
deadline
|
|
157
263
|
]);
|
|
@@ -162,6 +268,7 @@ class V1CaptureSender {
|
|
|
162
268
|
const cancelBody = ()=>cancellation ??= this.cancelBody(response);
|
|
163
269
|
return {
|
|
164
270
|
response,
|
|
271
|
+
redirectFailure,
|
|
165
272
|
signal: controller.signal,
|
|
166
273
|
waitFor: (operation)=>Promise.race([
|
|
167
274
|
operation,
|
|
@@ -172,14 +279,62 @@ class V1CaptureSender {
|
|
|
172
279
|
if (cleanedUp) return;
|
|
173
280
|
cleanedUp = true;
|
|
174
281
|
clearTimeout(timer);
|
|
282
|
+
stopListening();
|
|
175
283
|
if (controller.signal.aborted) cancelBody();
|
|
176
284
|
}
|
|
177
285
|
};
|
|
178
286
|
} catch (error) {
|
|
179
287
|
clearTimeout(timer);
|
|
288
|
+
stopListening();
|
|
180
289
|
throw error;
|
|
181
290
|
}
|
|
182
291
|
}
|
|
292
|
+
async fetchFollowingRedirects(url, headers, body, signal) {
|
|
293
|
+
let target = url;
|
|
294
|
+
for(let redirects = 0;; redirects++){
|
|
295
|
+
const response = await this.fetchFn(target, {
|
|
296
|
+
method: 'POST',
|
|
297
|
+
headers,
|
|
298
|
+
body: 'string' == typeof body ? body : body.slice(),
|
|
299
|
+
signal,
|
|
300
|
+
redirect: 'manual'
|
|
301
|
+
});
|
|
302
|
+
const { status } = response;
|
|
303
|
+
if (status < 300 || status >= 400) return {
|
|
304
|
+
response
|
|
305
|
+
};
|
|
306
|
+
if (!FOLLOWED_REDIRECT_STATUSES.has(status)) return {
|
|
307
|
+
response,
|
|
308
|
+
redirectFailure: `Capture V1 request got an HTTP ${status} redirect, which it does not follow`
|
|
309
|
+
};
|
|
310
|
+
if (redirects === MAX_REDIRECTS) return {
|
|
311
|
+
response,
|
|
312
|
+
redirectFailure: `Capture V1 request was redirected more than ${MAX_REDIRECTS} times`
|
|
313
|
+
};
|
|
314
|
+
const next = resolveLocation(response.headers?.get('Location'), target);
|
|
315
|
+
if (void 0 === next || originOf(next) !== this.hostOrigin) return {
|
|
316
|
+
response,
|
|
317
|
+
redirectFailure: `Capture V1 request got an HTTP ${status} redirect away from the configured host`
|
|
318
|
+
};
|
|
319
|
+
this.cancelBody(response);
|
|
320
|
+
if (signal.aborted) throw signal.reason;
|
|
321
|
+
target = next;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
async encodeBody(payload, headers) {
|
|
325
|
+
const codec = this.config.compression;
|
|
326
|
+
if ('none' === codec) return payload;
|
|
327
|
+
try {
|
|
328
|
+
const compressed = await this.compress(payload, codec);
|
|
329
|
+
if (null !== compressed) {
|
|
330
|
+
headers['Content-Encoding'] = codec;
|
|
331
|
+
return compressed;
|
|
332
|
+
}
|
|
333
|
+
} catch (error) {
|
|
334
|
+
if (this.config.isDebug) console.error(`Failed to ${codec} compress the capture request body`, error);
|
|
335
|
+
}
|
|
336
|
+
return payload;
|
|
337
|
+
}
|
|
183
338
|
buildHeaders(attempt, requestId) {
|
|
184
339
|
const sdkInfo = `${this.config.libraryId}/${this.config.libraryVersion}`;
|
|
185
340
|
const headers = {
|
|
@@ -194,24 +349,39 @@ class V1CaptureSender {
|
|
|
194
349
|
return headers;
|
|
195
350
|
}
|
|
196
351
|
classify(pending, parsed, drops) {
|
|
197
|
-
const results =
|
|
352
|
+
const results = new Map();
|
|
353
|
+
for (const [uuid, result] of Object.entries(parsed.results))results.set((0, external_uuid_js_namespaceObject.canonicalizeUuid)(uuid) ?? uuid, result);
|
|
198
354
|
const retryable = [];
|
|
355
|
+
let copiesSeen;
|
|
199
356
|
for (const event of pending){
|
|
200
|
-
const result = results
|
|
201
|
-
if (result)
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
357
|
+
const result = results.get(event.uuid);
|
|
358
|
+
if (!result) continue;
|
|
359
|
+
const duplicates = result.duplicates_dropped;
|
|
360
|
+
if ('number' == typeof duplicates && Number.isSafeInteger(duplicates) && duplicates > 0) {
|
|
361
|
+
copiesSeen ??= new Map();
|
|
362
|
+
const copy = copiesSeen.get(event.uuid) ?? 0;
|
|
363
|
+
copiesSeen.set(event.uuid, copy + 1);
|
|
364
|
+
if (copy >= 1 && copy <= duplicates) {
|
|
365
|
+
drops.push({
|
|
366
|
+
uuid: event.uuid,
|
|
367
|
+
details: DUPLICATE_EVENT_UUID
|
|
368
|
+
});
|
|
369
|
+
continue;
|
|
370
|
+
}
|
|
207
371
|
}
|
|
372
|
+
if ('drop' === result.result) drops.push({
|
|
373
|
+
uuid: event.uuid,
|
|
374
|
+
details: result.details ?? void 0
|
|
375
|
+
});
|
|
376
|
+
else if ('retry' === result.result) retryable.push(event);
|
|
208
377
|
}
|
|
209
378
|
return retryable;
|
|
210
379
|
}
|
|
211
380
|
backoffDelay(attempt, retryAfterMs) {
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
|
|
381
|
+
const jitter = 0.75 + 0.5 * this.random();
|
|
382
|
+
const backoff = Math.min(RETRY_BASE_DELAY_MS * 2 ** (attempt - 1) * jitter, MAX_RETRY_DELAY_MS);
|
|
383
|
+
if (void 0 === retryAfterMs) return backoff;
|
|
384
|
+
return Math.max(backoff, Math.min(retryAfterMs, MAX_RETRY_DELAY_MS));
|
|
215
385
|
}
|
|
216
386
|
parseRetryAfter(response) {
|
|
217
387
|
const raw = response.headers?.get('Retry-After');
|
|
@@ -231,9 +401,9 @@ class V1CaptureSender {
|
|
|
231
401
|
const parsed = JSON.parse(text);
|
|
232
402
|
if ('object' != typeof parsed || null === parsed || Array.isArray(parsed)) throw new Error('unexpected response shape');
|
|
233
403
|
const results = parsed.results;
|
|
234
|
-
if (
|
|
404
|
+
if ('object' != typeof results || null === results || Array.isArray(results)) throw new Error('unexpected results shape');
|
|
235
405
|
return {
|
|
236
|
-
results: results
|
|
406
|
+
results: results
|
|
237
407
|
};
|
|
238
408
|
}
|
|
239
409
|
async buildHttpError(response, status, waitFor) {
|
|
@@ -244,20 +414,36 @@ class V1CaptureSender {
|
|
|
244
414
|
const suffix = bodyText ? `: ${bodyText}` : '';
|
|
245
415
|
return new Error(`Capture V1 request failed with HTTP ${status}${suffix}`);
|
|
246
416
|
}
|
|
247
|
-
surfaceBatchFailure(requestId, drops, pending, cause) {
|
|
248
|
-
|
|
417
|
+
surfaceBatchFailure(requestId, drops, pending, cause, loss, failure) {
|
|
418
|
+
loss.add(failure, pending.length);
|
|
419
|
+
this.report(this.captureError({
|
|
249
420
|
requestId,
|
|
250
421
|
drops,
|
|
251
422
|
retryExhausted: pending.map((event)=>event.uuid),
|
|
252
423
|
cause
|
|
253
|
-
}));
|
|
424
|
+
}), loss);
|
|
254
425
|
}
|
|
255
|
-
surfacePartialDrops(requestId, drops) {
|
|
256
|
-
if (drops.length > 0) this.
|
|
426
|
+
surfacePartialDrops(requestId, drops, loss) {
|
|
427
|
+
if (drops.length > 0) this.report(this.captureError({
|
|
257
428
|
requestId,
|
|
258
429
|
drops,
|
|
259
430
|
retryExhausted: []
|
|
260
|
-
}));
|
|
431
|
+
}), loss);
|
|
432
|
+
}
|
|
433
|
+
report(error, loss) {
|
|
434
|
+
this.onError(error, (0, external_errors_js_namespaceObject.describeCaptureLoss)(this.config.path, loss));
|
|
435
|
+
}
|
|
436
|
+
describeTransportFailure(error, signal) {
|
|
437
|
+
if (error instanceof Error && timeoutErrors.has(error)) return 'failed: request timed out';
|
|
438
|
+
if (signal?.aborted) return 'failed: request aborted';
|
|
439
|
+
const name = error instanceof Error && /^\w{1,64}$/.test(error.name) ? error.name : 'unknown';
|
|
440
|
+
return `failed with a network error (${name})`;
|
|
441
|
+
}
|
|
442
|
+
captureError(params) {
|
|
443
|
+
return new external_errors_js_namespaceObject.CaptureError({
|
|
444
|
+
endpoint: this.config.path,
|
|
445
|
+
...params
|
|
446
|
+
});
|
|
261
447
|
}
|
|
262
448
|
async cancelBody(response) {
|
|
263
449
|
try {
|
|
@@ -265,8 +451,29 @@ class V1CaptureSender {
|
|
|
265
451
|
} catch {}
|
|
266
452
|
}
|
|
267
453
|
}
|
|
454
|
+
function originOf(url) {
|
|
455
|
+
try {
|
|
456
|
+
return new URL(url).origin;
|
|
457
|
+
} catch {
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
function resolveLocation(location, base) {
|
|
462
|
+
if (!location) return;
|
|
463
|
+
try {
|
|
464
|
+
return new URL(location, base).href;
|
|
465
|
+
} catch {
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
exports.DUPLICATE_EVENT_UUID = __webpack_exports__.DUPLICATE_EVENT_UUID;
|
|
470
|
+
exports.MAX_RETRY_DELAY_MS = __webpack_exports__.MAX_RETRY_DELAY_MS;
|
|
471
|
+
exports.RETRY_BASE_DELAY_MS = __webpack_exports__.RETRY_BASE_DELAY_MS;
|
|
268
472
|
exports.V1CaptureSender = __webpack_exports__.V1CaptureSender;
|
|
269
473
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
474
|
+
"DUPLICATE_EVENT_UUID",
|
|
475
|
+
"MAX_RETRY_DELAY_MS",
|
|
476
|
+
"RETRY_BASE_DELAY_MS",
|
|
270
477
|
"V1CaptureSender"
|
|
271
478
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
272
479
|
Object.defineProperty(exports, '__esModule', {
|