@sailfish-ai/recorder 1.10.11 → 1.10.13
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/dist/chunks/{chunkSerializer-BCPkBdRj.js → chunkSerializer-CodMnuS3.js} +1 -1
- package/dist/chunks/chunkSerializer-CodMnuS3.js.br +0 -0
- package/dist/chunks/chunkSerializer-CodMnuS3.js.gz +0 -0
- package/dist/chunks/{chunkSerializer-COhHoxJ2.js → chunkSerializer-Dk1eF3S8.js} +1 -1
- package/dist/chunks/chunkSerializer-Dk1eF3S8.js.br +0 -0
- package/dist/chunks/chunkSerializer-Dk1eF3S8.js.gz +0 -0
- package/dist/chunks/{index-DmRBuNoo.js → index-DW416eVj.js} +498 -518
- package/dist/chunks/index-DW416eVj.js.br +0 -0
- package/dist/chunks/index-DW416eVj.js.gz +0 -0
- package/dist/chunks/{index-2nktNgJ_.js → index-DvLh2k6O.js} +319 -280
- package/dist/chunks/index-DvLh2k6O.js.br +0 -0
- package/dist/chunks/index-DvLh2k6O.js.gz +0 -0
- package/dist/headlessDetection.js +29 -0
- package/dist/index.js +24 -10
- package/dist/recorder.cjs +2 -2
- package/dist/recorder.js +40 -39
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recording.js +7 -10
- package/dist/types/headlessDetection.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunks/chunkSerializer-BCPkBdRj.js.br +0 -0
- package/dist/chunks/chunkSerializer-BCPkBdRj.js.gz +0 -0
- package/dist/chunks/chunkSerializer-COhHoxJ2.js.br +0 -0
- package/dist/chunks/chunkSerializer-COhHoxJ2.js.gz +0 -0
- package/dist/chunks/index-2nktNgJ_.js.br +0 -0
- package/dist/chunks/index-2nktNgJ_.js.gz +0 -0
- package/dist/chunks/index-DmRBuNoo.js.br +0 -0
- package/dist/chunks/index-DmRBuNoo.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Detect headless / synthetic environments where the Sailfish recorder should
|
|
2
|
+
// no-op entirely (see startRecording in index.tsx).
|
|
3
|
+
//
|
|
4
|
+
// Covered environments:
|
|
5
|
+
// - Chrome Headless (HeadlessChrome UA token)
|
|
6
|
+
// - Google Lighthouse / PageSpeed Insights (Lighthouse, Chrome-Lighthouse)
|
|
7
|
+
// - WebPageTest (PTST UA token)
|
|
8
|
+
// - Puppeteer / Playwright / Selenium (navigator.webdriver === true)
|
|
9
|
+
//
|
|
10
|
+
// Why: PSI's sandbox DNS blocks many third-party hostnames, producing noisy
|
|
11
|
+
// console errors; synthetic audits penalize "third-party code" for any work
|
|
12
|
+
// the recorder does; and bot traffic pollutes real-user session data.
|
|
13
|
+
//
|
|
14
|
+
// SSR-safe: guards access to navigator for non-browser environments.
|
|
15
|
+
export function isHeadlessOrLighthouse() {
|
|
16
|
+
try {
|
|
17
|
+
if (typeof navigator === "undefined")
|
|
18
|
+
return false;
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
+
const nav = navigator;
|
|
21
|
+
if (nav.webdriver === true)
|
|
22
|
+
return true;
|
|
23
|
+
const ua = typeof nav.userAgent === "string" ? nav.userAgent : "";
|
|
24
|
+
return /HeadlessChrome|Lighthouse|Chrome-Lighthouse|PTST/i.test(ua);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import { fetchCaptureSettings, fetchFunctionSpanTrackingEnabled, sendDomainsToNo
|
|
|
10
10
|
import { sendMapUuidIfAvailable } from "./mapUuid";
|
|
11
11
|
import { getUrlAndStoredUuids, initializeConsolePlugin, initializeDomContentEvents, initializeRecording, invalidateUrlCache, } from "./recording";
|
|
12
12
|
import { HAS_DOCUMENT, HAS_LOCAL_STORAGE, HAS_SESSION_STORAGE, HAS_WINDOW, } from "./runtimeEnv";
|
|
13
|
+
import { isHeadlessOrLighthouse } from "./headlessDetection";
|
|
13
14
|
import { ensureSessionListeners, getOrSetSessionId } from "./session";
|
|
14
15
|
import { withAppUrlMetadata } from "./utils";
|
|
15
16
|
import { onNavigationChange } from "./websocket";
|
|
@@ -347,8 +348,8 @@ export function matchUrlWithWildcard(input, patterns) {
|
|
|
347
348
|
const domainRegex = getCachedRegex(`^${normalizedPatternDomain}$`, "i");
|
|
348
349
|
// Strip 'www.' from both the input domain and the pattern domain for comparison
|
|
349
350
|
const strippedDomain = domain.startsWith("www.") ? domain.slice(4) : domain;
|
|
350
|
-
// If pattern specifies a port, match the exact port
|
|
351
|
-
if (patternPort && port !== patternPort)
|
|
351
|
+
// If pattern specifies a port, match the exact port (or any port if wildcard)
|
|
352
|
+
if (patternPort && patternPort !== "*" && port !== patternPort)
|
|
352
353
|
return false;
|
|
353
354
|
// handle patterns like "*.example.com"
|
|
354
355
|
if (patternDomain.startsWith("*.")) {
|
|
@@ -382,12 +383,14 @@ export function matchUrlWithWildcard(input, patterns) {
|
|
|
382
383
|
return true;
|
|
383
384
|
});
|
|
384
385
|
}
|
|
385
|
-
function createSkipHeadersPropagationChecker(domainsToNotPropagateHeaderTo = []) {
|
|
386
|
+
export function createSkipHeadersPropagationChecker(domainsToNotPropagateHeaderTo = [], domainsToPropagateHeaderTo = []) {
|
|
386
387
|
// Pre-compute the combined domain exclusion patterns once per interceptor setup
|
|
387
388
|
const combinedPatterns = [
|
|
388
389
|
...DOMAINS_TO_NOT_PROPAGATE_HEADER_TO_DEFAULT,
|
|
389
390
|
...domainsToNotPropagateHeaderTo,
|
|
390
391
|
];
|
|
392
|
+
// Pre-compute allowlist presence once (avoids per-request .length check overhead)
|
|
393
|
+
const hasAllowlist = domainsToPropagateHeaderTo.length > 0;
|
|
391
394
|
return function shouldSkipHeadersPropagation(url) {
|
|
392
395
|
let urlObj;
|
|
393
396
|
try {
|
|
@@ -403,7 +406,11 @@ function createSkipHeadersPropagationChecker(domainsToNotPropagateHeaderTo = [])
|
|
|
403
406
|
if (lastDotIdx !== -1 && STATIC_EXTENSIONS_SET.has(lowerPathname.slice(lastDotIdx))) {
|
|
404
407
|
return true;
|
|
405
408
|
}
|
|
406
|
-
// 2️⃣
|
|
409
|
+
// 2️⃣ ALLOWLIST CHECK — if provided, URL must match at least one allowlist pattern
|
|
410
|
+
if (hasAllowlist && !matchUrlWithWildcard(url, domainsToPropagateHeaderTo)) {
|
|
411
|
+
return true;
|
|
412
|
+
}
|
|
413
|
+
// 3️⃣ WILDCARD-BASED EXCLUSION (domain + path) — blocklist still applies even if allowlisted
|
|
407
414
|
if (matchUrlWithWildcard(url, combinedPatterns)) {
|
|
408
415
|
return true;
|
|
409
416
|
}
|
|
@@ -411,12 +418,12 @@ function createSkipHeadersPropagationChecker(domainsToNotPropagateHeaderTo = [])
|
|
|
411
418
|
};
|
|
412
419
|
}
|
|
413
420
|
// Updated XMLHttpRequest interceptor with domain exclusion
|
|
414
|
-
function setupXMLHttpRequestInterceptor(domainsToNotPropagateHeaderTo = [], bodyCaptureConfig = { captureStreamingResponseBody: true, captureResponseBodyMaxMb: 10, captureStreamPrefixKb: 64, captureStreamTimeoutMs: 10000 }) {
|
|
421
|
+
function setupXMLHttpRequestInterceptor(domainsToNotPropagateHeaderTo = [], bodyCaptureConfig = { captureStreamingResponseBody: true, captureResponseBodyMaxMb: 10, captureStreamPrefixKb: 64, captureStreamTimeoutMs: 10000 }, domainsToPropagateHeaderTo = []) {
|
|
415
422
|
const originalOpen = XMLHttpRequest.prototype.open;
|
|
416
423
|
const originalSend = XMLHttpRequest.prototype.send;
|
|
417
424
|
const originalSetRequestHeader = XMLHttpRequest.prototype.setRequestHeader;
|
|
418
425
|
const sessionId = getOrSetSessionId();
|
|
419
|
-
const shouldSkipHeadersPropagation = createSkipHeadersPropagationChecker(domainsToNotPropagateHeaderTo);
|
|
426
|
+
const shouldSkipHeadersPropagation = createSkipHeadersPropagationChecker(domainsToNotPropagateHeaderTo, domainsToPropagateHeaderTo);
|
|
420
427
|
// Intercept setRequestHeader()
|
|
421
428
|
XMLHttpRequest.prototype.setRequestHeader = function (name, value) {
|
|
422
429
|
// initialize the buffer on first use
|
|
@@ -579,10 +586,10 @@ function setupXMLHttpRequestInterceptor(domainsToNotPropagateHeaderTo = [], body
|
|
|
579
586
|
};
|
|
580
587
|
}
|
|
581
588
|
// Updated fetch interceptor with exclusion handling
|
|
582
|
-
function setupFetchInterceptor(domainsToNotPropagateHeadersTo = [], bodyCaptureConfig = { captureStreamingResponseBody: true, captureResponseBodyMaxMb: 10, captureStreamPrefixKb: 64, captureStreamTimeoutMs: 10000 }) {
|
|
589
|
+
function setupFetchInterceptor(domainsToNotPropagateHeadersTo = [], bodyCaptureConfig = { captureStreamingResponseBody: true, captureResponseBodyMaxMb: 10, captureStreamPrefixKb: 64, captureStreamTimeoutMs: 10000 }, domainsToPropagateHeaderTo = []) {
|
|
583
590
|
const originalFetch = window.fetch;
|
|
584
591
|
const sessionId = getOrSetSessionId();
|
|
585
|
-
const shouldSkipHeadersPropagation = createSkipHeadersPropagationChecker(domainsToNotPropagateHeadersTo);
|
|
592
|
+
const shouldSkipHeadersPropagation = createSkipHeadersPropagationChecker(domainsToNotPropagateHeadersTo, domainsToPropagateHeaderTo);
|
|
586
593
|
// --- Streaming detection helpers ---
|
|
587
594
|
// Content types that indicate a streaming response.
|
|
588
595
|
// These responses should NOT have their body fully consumed — only a limited prefix is captured.
|
|
@@ -1022,6 +1029,13 @@ function getMapUuidFromWindow() {
|
|
|
1022
1029
|
// it would be 1 serviceIdentifier per frontend user session,
|
|
1023
1030
|
// which is very wasteful
|
|
1024
1031
|
export async function startRecording({ apiKey, backendApi = "https://api-service.sailfishqa.com", domainsToPropagateHeaderTo = [], domainsToNotPropagateHeaderTo = [], serviceVersion, serviceIdentifier, gitSha, serviceAdditionalMetadata, enableIpTracking, captureStreamingResponseBody = true, captureResponseBodyMaxMb = 10, captureStreamPrefixKb = 64, captureStreamTimeoutMs = 10000, enableFiberTracking = false, deferRecording, deferRecordingStart, chunkSnapshot, useWsWorker = true, }) {
|
|
1032
|
+
// Synthetic-environment no-op: Lighthouse/PSI, HeadlessChrome, WebPageTest
|
|
1033
|
+
// (PTST), Puppeteer/Playwright/Selenium (navigator.webdriver). We skip init
|
|
1034
|
+
// entirely to avoid WSS retry noise, third-party perf penalties in audits,
|
|
1035
|
+
// and polluting real-user session data.
|
|
1036
|
+
if (isHeadlessOrLighthouse()) {
|
|
1037
|
+
return;
|
|
1038
|
+
}
|
|
1025
1039
|
// deferRecording takes precedence; fall back to deprecated deferRecordingStart; default true
|
|
1026
1040
|
const effectiveDeferRecording = deferRecording ?? deferRecordingStart ?? true;
|
|
1027
1041
|
const sessionId = getOrSetSessionId();
|
|
@@ -1059,11 +1073,11 @@ export async function startRecording({ apiKey, backendApi = "https://api-service
|
|
|
1059
1073
|
// 1a. XHR + Fetch interceptors (must both run synchronously before any yield,
|
|
1060
1074
|
// so fire-and-forget callers patch fetch before frameworks capture it)
|
|
1061
1075
|
if (!g.xhrPatched) {
|
|
1062
|
-
setupXMLHttpRequestInterceptor(domainsToNotPropagateHeaderTo, bodyCaptureConfig);
|
|
1076
|
+
setupXMLHttpRequestInterceptor(domainsToNotPropagateHeaderTo, bodyCaptureConfig, domainsToPropagateHeaderTo);
|
|
1063
1077
|
g.xhrPatched = true;
|
|
1064
1078
|
}
|
|
1065
1079
|
if (!g.fetchPatched) {
|
|
1066
|
-
setupFetchInterceptor(domainsToNotPropagateHeaderTo, bodyCaptureConfig);
|
|
1080
|
+
setupFetchInterceptor(domainsToNotPropagateHeaderTo, bodyCaptureConfig, domainsToPropagateHeaderTo);
|
|
1067
1081
|
g.fetchPatched = true;
|
|
1068
1082
|
}
|
|
1069
1083
|
await yieldToMain();
|
package/dist/recorder.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const e = require("./chunks/index-
|
|
4
|
-
exports.DEFAULT_CAPTURE_SETTINGS = e.DEFAULT_CAPTURE_SETTINGS, exports.DEFAULT_CONSOLE_RECORDING_SETTINGS = e.DEFAULT_CONSOLE_RECORDING_SETTINGS, exports.STORAGE_VERSION = e.STORAGE_VERSION, exports.addOrUpdateMetadata = e.addOrUpdateMetadata, exports.buildBatches = e.buildBatches, exports.clearStaleFuncSpanState = e.clearStaleFuncSpanState, exports.createTriageAndIssueFromRecorder = e.createTriageAndIssueFromRecorder, exports.createTriageFromRecorder = e.createTriageFromRecorder, exports.disableFunctionSpanTracking = e.disableFunctionSpanTracking, exports.enableFunctionSpanTracking = e.enableFunctionSpanTracking, exports.ensureHrefCache = e.ensureHrefCache, exports.eventSize = e.eventSize, exports.fetchAndSendIp = e.fetchAndSendIp, exports.fetchCaptureSettings = e.fetchCaptureSettings, exports.fetchEngineeringTicketPlatformIntegrations = e.fetchEngineeringTicketPlatformIntegrations, exports.fetchFunctionSpanTrackingEnabled = e.fetchFunctionSpanTrackingEnabled, exports.flushBufferedEvents = e.flushBufferedEvents, exports.getCachedHref = e.getCachedHref, exports.getCachedHrefNoQuery = e.getCachedHrefNoQuery, exports.getFuncSpanHeader = e.getFuncSpanHeader, exports.getOrSetSessionId = e.getOrSetSessionId, exports.getUrlAndStoredUuids = e.getUrlAndStoredUuids, exports.identify = e.identify, exports.initRecorder = e.initRecorder, exports.initializeConsolePlugin = e.initializeConsolePlugin, exports.initializeDomContentEvents = e.initializeDomContentEvents, exports.initializeFunctionSpanTrackingFromApi = e.initializeFunctionSpanTrackingFromApi, exports.initializeRecording = e.initializeRecording, exports.initializeWebSocket = e.initializeWebSocket, exports.invalidateUrlCache = e.invalidateUrlCache, exports.isFunctionSpanTrackingEnabled = e.isFunctionSpanTrackingEnabled, exports.matchUrlWithWildcard = e.matchUrlWithWildcard, Object.defineProperty(exports, "nowTimestamp", { enumerable: true, get: () => e.nowTimestamp }), exports.onNavigationChange = e.onNavigationChange, exports.openReportIssueModal = e.openReportIssueModal, exports.restoreFuncSpanState = e.restoreFuncSpanState, exports.sendDomainsToNotPropagateHeaderTo = e.sendDomainsToNotPropagateHeaderTo, exports.sendEvent = e.sendEvent, exports.sendGraphQLRequest = e.sendGraphQLRequest, exports.sendMessage = e.sendMessage, exports.startRecording = e.startRecording, exports.startRecordingSession = e.startRecordingSession, exports.trackingEvent = e.trackingEvent, exports.withAppUrlMetadata = e.withAppUrlMetadata;
|
|
3
|
+
const e = require("./chunks/index-DW416eVj.js");
|
|
4
|
+
exports.DEFAULT_CAPTURE_SETTINGS = e.DEFAULT_CAPTURE_SETTINGS, exports.DEFAULT_CONSOLE_RECORDING_SETTINGS = e.DEFAULT_CONSOLE_RECORDING_SETTINGS, exports.STORAGE_VERSION = e.STORAGE_VERSION, exports.addOrUpdateMetadata = e.addOrUpdateMetadata, exports.buildBatches = e.buildBatches, exports.clearStaleFuncSpanState = e.clearStaleFuncSpanState, exports.createSkipHeadersPropagationChecker = e.createSkipHeadersPropagationChecker, exports.createTriageAndIssueFromRecorder = e.createTriageAndIssueFromRecorder, exports.createTriageFromRecorder = e.createTriageFromRecorder, exports.disableFunctionSpanTracking = e.disableFunctionSpanTracking, exports.enableFunctionSpanTracking = e.enableFunctionSpanTracking, exports.ensureHrefCache = e.ensureHrefCache, exports.eventSize = e.eventSize, exports.fetchAndSendIp = e.fetchAndSendIp, exports.fetchCaptureSettings = e.fetchCaptureSettings, exports.fetchEngineeringTicketPlatformIntegrations = e.fetchEngineeringTicketPlatformIntegrations, exports.fetchFunctionSpanTrackingEnabled = e.fetchFunctionSpanTrackingEnabled, exports.flushBufferedEvents = e.flushBufferedEvents, exports.getCachedHref = e.getCachedHref, exports.getCachedHrefNoQuery = e.getCachedHrefNoQuery, exports.getFuncSpanHeader = e.getFuncSpanHeader, exports.getOrSetSessionId = e.getOrSetSessionId, exports.getUrlAndStoredUuids = e.getUrlAndStoredUuids, exports.identify = e.identify, exports.initRecorder = e.initRecorder, exports.initializeConsolePlugin = e.initializeConsolePlugin, exports.initializeDomContentEvents = e.initializeDomContentEvents, exports.initializeFunctionSpanTrackingFromApi = e.initializeFunctionSpanTrackingFromApi, exports.initializeRecording = e.initializeRecording, exports.initializeWebSocket = e.initializeWebSocket, exports.invalidateUrlCache = e.invalidateUrlCache, exports.isFunctionSpanTrackingEnabled = e.isFunctionSpanTrackingEnabled, exports.matchUrlWithWildcard = e.matchUrlWithWildcard, Object.defineProperty(exports, "nowTimestamp", { enumerable: true, get: () => e.nowTimestamp }), exports.onNavigationChange = e.onNavigationChange, exports.openReportIssueModal = e.openReportIssueModal, exports.restoreFuncSpanState = e.restoreFuncSpanState, exports.sendDomainsToNotPropagateHeaderTo = e.sendDomainsToNotPropagateHeaderTo, exports.sendEvent = e.sendEvent, exports.sendGraphQLRequest = e.sendGraphQLRequest, exports.sendMessage = e.sendMessage, exports.startRecording = e.startRecording, exports.startRecordingSession = e.startRecordingSession, exports.trackingEvent = e.trackingEvent, exports.withAppUrlMetadata = e.withAppUrlMetadata;
|
package/dist/recorder.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, z, A, B, C, E, F, G, H, I, J, K, L, M, N, O, P, Q, R } from "./chunks/index-
|
|
1
|
+
import { D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, z, A, B, C, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T } from "./chunks/index-DvLh2k6O.js";
|
|
2
2
|
export {
|
|
3
3
|
D as DEFAULT_CAPTURE_SETTINGS,
|
|
4
4
|
a as DEFAULT_CONSOLE_RECORDING_SETTINGS,
|
|
@@ -6,42 +6,43 @@ export {
|
|
|
6
6
|
b as addOrUpdateMetadata,
|
|
7
7
|
c as buildBatches,
|
|
8
8
|
d as clearStaleFuncSpanState,
|
|
9
|
-
e as
|
|
10
|
-
f as
|
|
11
|
-
g as
|
|
12
|
-
h as
|
|
13
|
-
i as
|
|
14
|
-
j as
|
|
15
|
-
k as
|
|
16
|
-
l as
|
|
17
|
-
m as
|
|
18
|
-
n as
|
|
19
|
-
o as
|
|
20
|
-
p as
|
|
21
|
-
q as
|
|
22
|
-
r as
|
|
23
|
-
s as
|
|
24
|
-
t as
|
|
25
|
-
u as
|
|
26
|
-
v as
|
|
27
|
-
w as
|
|
28
|
-
x as
|
|
29
|
-
z as
|
|
30
|
-
A as
|
|
31
|
-
B as
|
|
32
|
-
C as
|
|
33
|
-
E as
|
|
34
|
-
F as
|
|
35
|
-
G as
|
|
36
|
-
H as
|
|
37
|
-
I as
|
|
38
|
-
J as
|
|
39
|
-
K as
|
|
40
|
-
L as
|
|
41
|
-
M as
|
|
42
|
-
N as
|
|
43
|
-
O as
|
|
44
|
-
P as
|
|
45
|
-
Q as
|
|
46
|
-
R as
|
|
9
|
+
e as createSkipHeadersPropagationChecker,
|
|
10
|
+
f as createTriageAndIssueFromRecorder,
|
|
11
|
+
g as createTriageFromRecorder,
|
|
12
|
+
h as disableFunctionSpanTracking,
|
|
13
|
+
i as enableFunctionSpanTracking,
|
|
14
|
+
j as ensureHrefCache,
|
|
15
|
+
k as eventSize,
|
|
16
|
+
l as fetchAndSendIp,
|
|
17
|
+
m as fetchCaptureSettings,
|
|
18
|
+
n as fetchEngineeringTicketPlatformIntegrations,
|
|
19
|
+
o as fetchFunctionSpanTrackingEnabled,
|
|
20
|
+
p as flushBufferedEvents,
|
|
21
|
+
q as getCachedHref,
|
|
22
|
+
r as getCachedHrefNoQuery,
|
|
23
|
+
s as getFuncSpanHeader,
|
|
24
|
+
t as getOrSetSessionId,
|
|
25
|
+
u as getUrlAndStoredUuids,
|
|
26
|
+
v as identify,
|
|
27
|
+
w as initRecorder,
|
|
28
|
+
x as initializeConsolePlugin,
|
|
29
|
+
z as initializeDomContentEvents,
|
|
30
|
+
A as initializeFunctionSpanTrackingFromApi,
|
|
31
|
+
B as initializeRecording,
|
|
32
|
+
C as initializeWebSocket,
|
|
33
|
+
E as invalidateUrlCache,
|
|
34
|
+
F as isFunctionSpanTrackingEnabled,
|
|
35
|
+
G as matchUrlWithWildcard,
|
|
36
|
+
H as nowTimestamp,
|
|
37
|
+
I as onNavigationChange,
|
|
38
|
+
J as openReportIssueModal,
|
|
39
|
+
K as restoreFuncSpanState,
|
|
40
|
+
L as sendDomainsToNotPropagateHeaderTo,
|
|
41
|
+
M as sendEvent,
|
|
42
|
+
N as sendGraphQLRequest,
|
|
43
|
+
O as sendMessage,
|
|
44
|
+
P as startRecording,
|
|
45
|
+
Q as startRecordingSession,
|
|
46
|
+
R as trackingEvent,
|
|
47
|
+
T as withAppUrlMetadata
|
|
47
48
|
};
|
package/dist/recorder.js.br
CHANGED
|
Binary file
|
package/dist/recorder.js.gz
CHANGED
|
Binary file
|
package/dist/recording.js
CHANGED
|
@@ -141,16 +141,13 @@ export function initializeDomContentEvents(sessionId) {
|
|
|
141
141
|
...getUrlAndStoredUuids(),
|
|
142
142
|
});
|
|
143
143
|
});
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
|
-
window.addEventListener("unload", () => {
|
|
144
|
+
// Use `pagehide` instead of `unload`/`beforeunload`:
|
|
145
|
+
// - `unload` is deprecated in Chrome and flagged by Lighthouse.
|
|
146
|
+
// - Both `unload` and `beforeunload` disqualify the page from BFCache,
|
|
147
|
+
// hurting customer perf scores.
|
|
148
|
+
// - `pagehide` fires reliably on navigation, tab close, AND mobile
|
|
149
|
+
// tab-kill / Safari back-forward restore, which `unload` misses.
|
|
150
|
+
window.addEventListener("pagehide", () => {
|
|
154
151
|
sendEvent({
|
|
155
152
|
type: DomContentEventId,
|
|
156
153
|
data: { source: DomContentSource.unload },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isHeadlessOrLighthouse(): boolean;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare const STORAGE_VERSION = 1;
|
|
|
5
5
|
export declare const DEFAULT_CAPTURE_SETTINGS: CaptureSettings;
|
|
6
6
|
export declare const DEFAULT_CONSOLE_RECORDING_SETTINGS: LogRecordOptions;
|
|
7
7
|
export declare function matchUrlWithWildcard(input: unknown, patterns: string[]): boolean;
|
|
8
|
+
export declare function createSkipHeadersPropagationChecker(domainsToNotPropagateHeaderTo?: string[], domainsToPropagateHeaderTo?: string[]): (url: string) => boolean;
|
|
8
9
|
export declare function startRecording({ apiKey, backendApi, domainsToPropagateHeaderTo, domainsToNotPropagateHeaderTo, serviceVersion, serviceIdentifier, gitSha, serviceAdditionalMetadata, enableIpTracking, captureStreamingResponseBody, captureResponseBodyMaxMb, captureStreamPrefixKb, captureStreamTimeoutMs, enableFiberTracking, deferRecording, deferRecordingStart, chunkSnapshot, useWsWorker, }: {
|
|
9
10
|
apiKey: string;
|
|
10
11
|
backendApi?: string;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|