@sailfish-ai/recorder 1.8.8 → 1.8.10
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/dist/errorInterceptor.js +3 -1
- package/dist/recorder.cjs +796 -764
- package/dist/recorder.js +798 -766
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +796 -764
- package/dist/websocket.js +131 -15
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/errorInterceptor.js
CHANGED
|
@@ -106,6 +106,7 @@ async function captureError(error, isPromiseRejection = false) {
|
|
|
106
106
|
const mappedStack = await resolveStackTrace(stack);
|
|
107
107
|
const filteredStack = mappedStack.filter((line) => !line.includes("chunk-") && !line.includes("react-dom"));
|
|
108
108
|
const trace = filteredStack.length > 0 ? filteredStack : mappedStack;
|
|
109
|
+
const timestamp = Date.now();
|
|
109
110
|
const errorDetails = {
|
|
110
111
|
message: errorMessage,
|
|
111
112
|
stack,
|
|
@@ -113,7 +114,7 @@ async function captureError(error, isPromiseRejection = false) {
|
|
|
113
114
|
filteredStack,
|
|
114
115
|
userAgent: navigator.userAgent,
|
|
115
116
|
url: window.location.href,
|
|
116
|
-
timestamp
|
|
117
|
+
timestamp,
|
|
117
118
|
level: "error",
|
|
118
119
|
};
|
|
119
120
|
// Sends the mapped error details to the backend.
|
|
@@ -121,6 +122,7 @@ async function captureError(error, isPromiseRejection = false) {
|
|
|
121
122
|
type: "event",
|
|
122
123
|
event: {
|
|
123
124
|
type: 6,
|
|
125
|
+
timestamp, // Add timestamp at event root level for consistency with other events
|
|
124
126
|
data: {
|
|
125
127
|
payload: errorDetails,
|
|
126
128
|
},
|