@@ -182,20 +182,6 @@ export interface WorkerResponse {
182
182
183
183
export type AddEventResult = void ;
184
184
185
- interface SessionAndPluginOptions {
186
- /**
187
- * The sample rate for session-long replays. 1.0 will record all sessions and
188
- * 0 will record none.
189
- */
190
- sessionSampleRate : number ;
191
-
192
- /**
193
- * The sample rate for sessions that has had an error occur. This is
194
- * independent of `sessionSampleRate`.
195
- */
196
- errorSampleRate : number ;
197
- }
198
-
199
185
export interface ReplayNetworkOptions {
200
186
/**
201
187
* Capture request/response details for XHR/Fetch requests that match the given URLs.
@@ -229,35 +215,24 @@ export interface ReplayNetworkOptions {
229
215
networkResponseHeaders : string [ ] ;
230
216
}
231
217
232
- /**
233
- * Session options that are configurable by the integration configuration
234
- */
235
- export interface SessionOptions extends SampleRates {
218
+ export interface ReplayPluginOptions extends ReplayNetworkOptions {
236
219
/**
237
- * If false, will create a new session per pageload. Otherwise, saves session
238
- * to Session Storage .
220
+ * The sample rate for session-long replays. 1.0 will record all sessions and
221
+ * 0 will record none .
239
222
*/
240
- stickySession : boolean ;
241
- }
223
+ sessionSampleRate : number ;
242
224
243
- /**
244
- * Session options that are configurable by the integration configuration
245
- */
246
- export interface SessionOptions extends SessionAndPluginOptions {
247
225
/**
248
- * Should buffer recordings to be saved later either by error sampling, or by
249
- * manually calling `flush()`. This is only a factor if not sampled for a
250
- * session-based replay.
226
+ * The sample rate for sessions that has had an error occur. This is
227
+ * independent of `sessionSampleRate`.
251
228
*/
252
- allowBuffering : boolean ;
253
- }
229
+ errorSampleRate : number ;
254
230
255
- export interface ReplayPluginOptions extends SessionAndPluginOptions , ReplayNetworkOptions {
256
231
/**
257
- * The sample rate for each error event. This is only a factor if not sampled
258
- * for a session-based replay .
232
+ * If false, will create a new session per pageload. Otherwise, saves session
233
+ * to Session Storage .
259
234
*/
260
- errorSampleRate : number ;
235
+ stickySession : boolean ;
261
236
262
237
/**
263
238
* The amount of time to wait before sending a replay
@@ -296,6 +271,19 @@ export interface ReplayPluginOptions extends SessionAndPluginOptions, ReplayNetw
296
271
} > ;
297
272
}
298
273
274
+ /**
275
+ * Session options that are configurable by the integration configuration
276
+ */
277
+ export interface SessionOptions extends Pick < ReplayPluginOptions , 'sessionSampleRate' | 'stickySession' > {
278
+ /**
279
+ * Should buffer recordings to be saved later either by error sampling, or by
280
+ * manually calling `flush()`. This is only a factor if not sampled for a
281
+ * session-based replay.
282
+ */
283
+ allowBuffering : boolean ;
284
+ }
285
+
286
+
299
287
export interface ReplayIntegrationPrivacyOptions {
300
288
/**
301
289
* Mask text content for elements that match the CSS selectors in the list.
0 commit comments