@sailfish-ai/recorder 1.8.13 → 1.8.15
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/recorder.cjs +2 -2
- package/dist/recorder.js +2 -2
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +2 -2
- package/dist/websocket.js +9 -9
- package/package.json +2 -2
package/dist/recorder.cjs
CHANGED
|
@@ -465,7 +465,7 @@ function initializeWebSocket(e, a, u, m2) {
|
|
|
465
465
|
const a2 = document.createElement("a");
|
|
466
466
|
return a2.href = e2, `${a2.hostname}${a2.port ? `:${a2.port}` : ""}`;
|
|
467
467
|
})(e);
|
|
468
|
-
let b2 = `${"https:" === new URL(e).protocol ? "wss" : "ws"}://${w2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.8.
|
|
468
|
+
let b2 = `${"https:" === new URL(e).protocol ? "wss" : "ws"}://${w2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.8.15`;
|
|
469
469
|
m2 && (b2 += `&envValue=${encodeURIComponent(m2)}`);
|
|
470
470
|
return oe = new $(b2, [], { connectionTimeout: 3e4 }), oe.addEventListener("open", () => {
|
|
471
471
|
ne && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (ce ? "ENABLED" : "DISABLED"))), (async () => {
|
|
@@ -562,7 +562,7 @@ function getFuncSpanHeader() {
|
|
|
562
562
|
if (null !== de) {
|
|
563
563
|
if (Date.now() >= de) return ce = false, de = null, clearGlobalFuncSpanState(), ne && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
|
|
564
564
|
}
|
|
565
|
-
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-
|
|
565
|
+
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-1-10-10-1-1.0-1-0-0" };
|
|
566
566
|
}
|
|
567
567
|
(() => {
|
|
568
568
|
const e = (function loadGlobalFuncSpanState() {
|
package/dist/recorder.js
CHANGED
|
@@ -465,7 +465,7 @@ function initializeWebSocket(e, a, u, m2) {
|
|
|
465
465
|
const a2 = document.createElement("a");
|
|
466
466
|
return a2.href = e2, `${a2.hostname}${a2.port ? `:${a2.port}` : ""}`;
|
|
467
467
|
})(e);
|
|
468
|
-
let b2 = `${"https:" === new URL(e).protocol ? "wss" : "ws"}://${w2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.8.
|
|
468
|
+
let b2 = `${"https:" === new URL(e).protocol ? "wss" : "ws"}://${w2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.8.15`;
|
|
469
469
|
m2 && (b2 += `&envValue=${encodeURIComponent(m2)}`);
|
|
470
470
|
return se = new $(b2, [], { connectionTimeout: 3e4 }), se.addEventListener("open", () => {
|
|
471
471
|
re && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (pe ? "ENABLED" : "DISABLED"))), (async () => {
|
|
@@ -562,7 +562,7 @@ function getFuncSpanHeader() {
|
|
|
562
562
|
if (null !== he) {
|
|
563
563
|
if (Date.now() >= he) return pe = false, he = null, clearGlobalFuncSpanState(), re && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
|
|
564
564
|
}
|
|
565
|
-
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-
|
|
565
|
+
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-1-10-10-1-1.0-1-0-0" };
|
|
566
566
|
}
|
|
567
567
|
(() => {
|
|
568
568
|
const e = (function loadGlobalFuncSpanState() {
|
package/dist/recorder.js.br
CHANGED
|
Binary file
|
package/dist/recorder.js.gz
CHANGED
|
Binary file
|
package/dist/recorder.umd.cjs
CHANGED
|
@@ -467,7 +467,7 @@
|
|
|
467
467
|
const a3 = document.createElement("a");
|
|
468
468
|
return a3.href = e3, `${a3.hostname}${a3.port ? `:${a3.port}` : ""}`;
|
|
469
469
|
})(e2);
|
|
470
|
-
let b2 = `${"https:" === new URL(e2).protocol ? "wss" : "ws"}://${w2}/ws/notify/?apiKey=${a2}&sessionId=${u2}&sender=JS%2FTS&version=1.8.
|
|
470
|
+
let b2 = `${"https:" === new URL(e2).protocol ? "wss" : "ws"}://${w2}/ws/notify/?apiKey=${a2}&sessionId=${u2}&sender=JS%2FTS&version=1.8.15`;
|
|
471
471
|
m2 && (b2 += `&envValue=${encodeURIComponent(m2)}`);
|
|
472
472
|
return se = new z(b2, [], { connectionTimeout: 3e4 }), se.addEventListener("open", () => {
|
|
473
473
|
re && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (pe ? "ENABLED" : "DISABLED"))), (async () => {
|
|
@@ -564,7 +564,7 @@
|
|
|
564
564
|
if (null !== he) {
|
|
565
565
|
if (Date.now() >= he) return pe = false, he = null, clearGlobalFuncSpanState(), re && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
|
|
566
566
|
}
|
|
567
|
-
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-
|
|
567
|
+
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-1-10-10-1-1.0-1-0-0" };
|
|
568
568
|
}
|
|
569
569
|
(() => {
|
|
570
570
|
const e2 = (function loadGlobalFuncSpanState() {
|
package/dist/websocket.js
CHANGED
|
@@ -10,7 +10,7 @@ const MAX_MESSAGE_SIZE_MB = 50;
|
|
|
10
10
|
const MAX_MESSAGE_SIZE_BYTES = MAX_MESSAGE_SIZE_MB * 1024 * 1024;
|
|
11
11
|
// Function span tracking header constants
|
|
12
12
|
const FUNCSPAN_HEADER_NAME = "X-Sf3-FunctionSpanCaptureOverride";
|
|
13
|
-
const FUNCSPAN_HEADER_VALUE = "1-
|
|
13
|
+
const FUNCSPAN_HEADER_VALUE = "1-1-10-10-1-1.0-1-0-0";
|
|
14
14
|
// Tracking configuration type constants (must match backend TrackingConfigurationType enum)
|
|
15
15
|
const TRACKING_CONFIG_GLOBAL = "global";
|
|
16
16
|
const TRACKING_CONFIG_PER_SESSION = "per_session";
|
|
@@ -39,7 +39,7 @@ function saveGlobalFuncSpanState(enabled, expirationTimestampMs) {
|
|
|
39
39
|
const state = {
|
|
40
40
|
enabled,
|
|
41
41
|
expirationTimestampMs,
|
|
42
|
-
savedAt: Date.now()
|
|
42
|
+
savedAt: Date.now(),
|
|
43
43
|
};
|
|
44
44
|
localStorage.setItem(FUNCSPAN_STORAGE_KEY, JSON.stringify(state));
|
|
45
45
|
if (DEBUG) {
|
|
@@ -117,7 +117,7 @@ export function clearStaleFuncSpanState() {
|
|
|
117
117
|
if (DEBUG) {
|
|
118
118
|
console.log(`[Sailfish] Module init: Restored global function span tracking from localStorage:`, {
|
|
119
119
|
enabled: true,
|
|
120
|
-
expirationTime: funcSpanExpirationTime
|
|
120
|
+
expirationTime: funcSpanExpirationTime,
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
// Check if tracking has already expired
|
|
@@ -256,7 +256,7 @@ export function initializeWebSocket(backendApi, apiKey, sessionId, envValue) {
|
|
|
256
256
|
webSocket.addEventListener("open", () => {
|
|
257
257
|
if (DEBUG) {
|
|
258
258
|
console.log("[Sailfish] WebSocket connection opened");
|
|
259
|
-
console.log(`[Sailfish] Function span tracking state: ${funcSpanTrackingEnabled ?
|
|
259
|
+
console.log(`[Sailfish] Function span tracking state: ${funcSpanTrackingEnabled ? "ENABLED" : "DISABLED"}`);
|
|
260
260
|
}
|
|
261
261
|
(async () => {
|
|
262
262
|
try {
|
|
@@ -289,7 +289,7 @@ export function initializeWebSocket(backendApi, apiKey, sessionId, envValue) {
|
|
|
289
289
|
console.log(`[Sailfish] Received funcSpanTrackingControl message:`, {
|
|
290
290
|
enabled: data.enabled,
|
|
291
291
|
timeoutSeconds: data.timeoutSeconds,
|
|
292
|
-
expirationTimestampMs: data.expirationTimestampMs
|
|
292
|
+
expirationTimestampMs: data.expirationTimestampMs,
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
295
|
// Clear any existing timeout
|
|
@@ -301,7 +301,7 @@ export function initializeWebSocket(backendApi, apiKey, sessionId, envValue) {
|
|
|
301
301
|
funcSpanTrackingEnabled = data.enabled;
|
|
302
302
|
isLocalTrackingMode = false; // Mark as global tracking, not local
|
|
303
303
|
if (DEBUG) {
|
|
304
|
-
console.log(`[Sailfish] Function span tracking ${data.enabled ?
|
|
304
|
+
console.log(`[Sailfish] Function span tracking ${data.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)"}`);
|
|
305
305
|
}
|
|
306
306
|
if (data.enabled) {
|
|
307
307
|
// Use server-provided expiration timestamp for synchronization across all clients/pods
|
|
@@ -364,7 +364,7 @@ export function initializeWebSocket(backendApi, apiKey, sessionId, envValue) {
|
|
|
364
364
|
// Fallback: no server timestamp provided, use local calculation (legacy behavior)
|
|
365
365
|
const timeoutSeconds = data.timeoutSeconds || 3600; // Default 1 hour
|
|
366
366
|
if (timeoutSeconds > 0) {
|
|
367
|
-
funcSpanExpirationTime = Date.now() +
|
|
367
|
+
funcSpanExpirationTime = Date.now() + timeoutSeconds * 1000;
|
|
368
368
|
// Save to localStorage for persistence across page refreshes
|
|
369
369
|
saveGlobalFuncSpanState(true, funcSpanExpirationTime);
|
|
370
370
|
funcSpanTimeoutId = window.setTimeout(() => {
|
|
@@ -406,7 +406,7 @@ export function initializeWebSocket(backendApi, apiKey, sessionId, envValue) {
|
|
|
406
406
|
type: "funcSpanTrackingSessionReport",
|
|
407
407
|
sessionId: sessionId,
|
|
408
408
|
enabled: true,
|
|
409
|
-
configurationType: TRACKING_CONFIG_GLOBAL
|
|
409
|
+
configurationType: TRACKING_CONFIG_GLOBAL,
|
|
410
410
|
}));
|
|
411
411
|
if (DEBUG) {
|
|
412
412
|
console.log(`[Sailfish] GLOBAL tracking session report sent for session: ${sessionId}`);
|
|
@@ -591,6 +591,6 @@ export function getFuncSpanHeader() {
|
|
|
591
591
|
}
|
|
592
592
|
return {
|
|
593
593
|
name: FUNCSPAN_HEADER_NAME,
|
|
594
|
-
value: FUNCSPAN_HEADER_VALUE
|
|
594
|
+
value: FUNCSPAN_HEADER_VALUE,
|
|
595
595
|
};
|
|
596
596
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sailfish-ai/recorder",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.15",
|
|
4
4
|
"publishPublicly": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/recorder.cjs",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@sailfish-ai/sf-map-utils": "0.4.
|
|
40
|
+
"@sailfish-ai/sf-map-utils": "0.4.5",
|
|
41
41
|
"@sailfish-rrweb/rrweb-plugin-console-record": "0.5.2",
|
|
42
42
|
"@sailfish-rrweb/rrweb-record-only": "0.5.2",
|
|
43
43
|
"@sailfish-rrweb/types": "0.5.2",
|