@sentry/replay 7.47.0 → 7.49.0

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.
Files changed (33) hide show
  1. package/README.md +5 -0
  2. package/cjs/index.js +607 -60
  3. package/cjs/index.js.map +1 -1
  4. package/esm/index.js +608 -61
  5. package/esm/index.js.map +1 -1
  6. package/package.json +5 -5
  7. package/types/constants.d.ts +1 -1
  8. package/types/coreHandlers/handleNetworkBreadcrumbs.d.ts +2 -3
  9. package/types/coreHandlers/handleNetworkBreadcrumbs.d.ts.map +1 -1
  10. package/types/coreHandlers/handleXhr.d.ts.map +1 -1
  11. package/types/coreHandlers/util/addBreadcrumbEvent.d.ts.map +1 -1
  12. package/types/coreHandlers/util/fetchUtils.d.ts +2 -3
  13. package/types/coreHandlers/util/fetchUtils.d.ts.map +1 -1
  14. package/types/coreHandlers/util/networkUtils.d.ts +3 -1
  15. package/types/coreHandlers/util/networkUtils.d.ts.map +1 -1
  16. package/types/coreHandlers/util/xhrUtils.d.ts +2 -3
  17. package/types/coreHandlers/util/xhrUtils.d.ts.map +1 -1
  18. package/types/integration.d.ts +4 -0
  19. package/types/integration.d.ts.map +1 -1
  20. package/types/replay.d.ts +8 -1
  21. package/types/replay.d.ts.map +1 -1
  22. package/types/types.d.ts +26 -4
  23. package/types/types.d.ts.map +1 -1
  24. package/types/util/sendReplayRequest.d.ts +1 -1
  25. package/types/util/sendReplayRequest.d.ts.map +1 -1
  26. package/types/util/truncateJson/completeJson.d.ts +9 -0
  27. package/types/util/truncateJson/completeJson.d.ts.map +1 -0
  28. package/types/util/truncateJson/constants.d.ts +12 -0
  29. package/types/util/truncateJson/constants.d.ts.map +1 -0
  30. package/types/util/truncateJson/evaluateJson.d.ts +6 -0
  31. package/types/util/truncateJson/evaluateJson.d.ts.map +1 -0
  32. package/types/util/truncateJson/fixJson.d.ts +6 -0
  33. package/types/util/truncateJson/fixJson.d.ts.map +1 -0
package/README.md CHANGED
@@ -138,6 +138,11 @@ A session starts when the Session Replay SDK is first loaded and initialized. Th
138
138
 
139
139
  [^1]: An 'interaction' refers to either a mouse click or a browser navigation event.
140
140
 
141
+ ### Accessing the Replay Session ID
142
+
143
+ You can get the ID of the currently running session via `replay.getReplayId()`.
144
+ This will return `undefined` if no session is ongoing.
145
+
141
146
  ### Replay Captures Only on Errors
142
147
 
143
148
  Alternatively, rather than recording an entire session, you can capture a replay only when an error occurs. In this case, the integration will buffer up to one minute worth of events prior to the error being thrown. It will continue to record the session following the rules above regarding session life and activity. Read the [sampling](#Sampling) section for configuration options.