@sailfish-ai/recorder 1.8.9 → 1.8.11

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.
@@ -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: Date.now(),
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
  },
package/dist/index.js CHANGED
@@ -909,6 +909,7 @@ export * from "./graphql";
909
909
  export { openReportIssueModal } from "./inAppReportIssueModal";
910
910
  export * from "./recording";
911
911
  export * from "./sendSailfishMessages";
912
+ export { getOrSetSessionId } from "./session";
912
913
  export * from "./types";
913
914
  export * from "./utils";
914
915
  export * from "./websocket";