@sentry/replay
Advanced tools
Comparing version 0.6.13 to 0.6.14-0
@@ -5,3 +5,3 @@ import { Breadcrumb, Event, Integration } from '@sentry/types'; | ||
import { IEventBuffer } from './eventBuffer'; | ||
import type { AllPerformanceEntry, InitialState, InstrumentationTypeBreadcrumb, InstrumentationTypeSpan, RecordedEvents, RecordingEvent, RecordingOptions, ReplayConfiguration, ReplayPluginOptions, SendReplayRequest } from './types'; | ||
import type { AllPerformanceEntry, InitialState, InstrumentationTypeBreadcrumb, InstrumentationTypeSpan, RecordingEvent, RecordingOptions, ReplayConfiguration, ReplayPluginOptions, SendReplay } from './types'; | ||
/** | ||
@@ -282,3 +282,3 @@ * Returns true to return control to calling function, otherwise continue with normal batching | ||
*/ | ||
sendReplayRequest({ endpoint, events, replayId: event_id, segmentId: segment_id, includeReplayStartTimestamp, }: SendReplayRequest): Promise<void>; | ||
sendReplayRequest({ events, replayId: event_id, segmentId: segment_id, includeReplayStartTimestamp, }: SendReplay): Promise<void | undefined>; | ||
resetRetries(): void; | ||
@@ -288,9 +288,4 @@ /** | ||
*/ | ||
sendReplay({ replayId, events, segmentId, includeReplayStartTimestamp, }: { | ||
replayId: string; | ||
events: RecordedEvents; | ||
segmentId: number; | ||
includeReplayStartTimestamp: boolean; | ||
}): Promise<unknown>; | ||
sendReplay({ replayId, events, segmentId, includeReplayStartTimestamp, }: SendReplay): Promise<unknown>; | ||
} | ||
export {}; |
@@ -52,2 +52,3 @@ import { SampleRates, SessionOptions } from '../types'; | ||
get started(): number; | ||
set started(newDate: number); | ||
get lastActivity(): number; | ||
@@ -54,0 +55,0 @@ set lastActivity(newDate: number); |
@@ -6,4 +6,3 @@ import type { eventWithTime, recordOptions } from 'rrweb/typings/types'; | ||
export declare type AllPerformanceEntry = PerformancePaintTiming | PerformanceResourceTiming | PerformanceNavigationTiming; | ||
export interface SendReplayRequest { | ||
endpoint: string; | ||
export interface SendReplay { | ||
events: RecordedEvents; | ||
@@ -10,0 +9,0 @@ replayId: string; |
@@ -5,3 +5,3 @@ import { Breadcrumb, Event, Integration } from '@sentry/types'; | ||
import { IEventBuffer } from './eventBuffer'; | ||
import type { AllPerformanceEntry, InitialState, InstrumentationTypeBreadcrumb, InstrumentationTypeSpan, RecordedEvents, RecordingEvent, RecordingOptions, ReplayConfiguration, ReplayPluginOptions, SendReplayRequest } from './types'; | ||
import type { AllPerformanceEntry, InitialState, InstrumentationTypeBreadcrumb, InstrumentationTypeSpan, RecordingEvent, RecordingOptions, ReplayConfiguration, ReplayPluginOptions, SendReplay } from './types'; | ||
/** | ||
@@ -282,3 +282,3 @@ * Returns true to return control to calling function, otherwise continue with normal batching | ||
*/ | ||
sendReplayRequest({ endpoint, events, replayId: event_id, segmentId: segment_id, includeReplayStartTimestamp, }: SendReplayRequest): Promise<void>; | ||
sendReplayRequest({ events, replayId: event_id, segmentId: segment_id, includeReplayStartTimestamp, }: SendReplay): Promise<void | undefined>; | ||
resetRetries(): void; | ||
@@ -288,9 +288,4 @@ /** | ||
*/ | ||
sendReplay({ replayId, events, segmentId, includeReplayStartTimestamp, }: { | ||
replayId: string; | ||
events: RecordedEvents; | ||
segmentId: number; | ||
includeReplayStartTimestamp: boolean; | ||
}): Promise<unknown>; | ||
sendReplay({ replayId, events, segmentId, includeReplayStartTimestamp, }: SendReplay): Promise<unknown>; | ||
} | ||
export {}; |
@@ -52,2 +52,3 @@ import { SampleRates, SessionOptions } from '../types'; | ||
get started(): number; | ||
set started(newDate: number); | ||
get lastActivity(): number; | ||
@@ -54,0 +55,0 @@ set lastActivity(newDate: number); |
@@ -6,4 +6,3 @@ import type { eventWithTime, recordOptions } from 'rrweb/typings/types'; | ||
export declare type AllPerformanceEntry = PerformancePaintTiming | PerformanceResourceTiming | PerformanceNavigationTiming; | ||
export interface SendReplayRequest { | ||
endpoint: string; | ||
export interface SendReplay { | ||
events: RecordedEvents; | ||
@@ -10,0 +9,0 @@ replayId: string; |
{ | ||
"name": "@sentry/replay", | ||
"version": "0.6.13", | ||
"version": "0.6.14-0", | ||
"description": "User replays for Sentry", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -82,2 +82,22 @@ # sentry-replay | ||
## Sessions | ||
A session starts when the Session Replay SDK is first loaded and initialized. The session will continue until 5 minutes passes without any user interactions[^1] with the application *OR* until a maximum of 30 minutes have elapsed. Closing the browser tab will end the session immediately according to the rules for [SessionStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage). | ||
[^1]: An 'interaction' refers to either a mouse click or a browser navigation event. | ||
### Replay Captures Only on Errors | ||
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. | ||
## Sampling | ||
Sampling allows you to control how much of your website's traffic will result in a Session Replay. There are two sample rates you can adjust to get the replays more relevant to your interests: | ||
- `sessionSampleRate` - The sample rate for replays that begin recording immediately and last the entirety of the user's session. | ||
- `errorSampleRate` - The sample rate for replays that are recorded when an error happens. This type of replay will record up to a minute of events prior to the error and continue recording until the session ends. | ||
Sampling occurs when the session is first started. `sessionSampleRate` is evaluated first. If it is sampled, then the replay recording begins. Otherwise, `errorSampleRate` is evaluated and if it is sampled, the integration will begin buffering the replay and will only upload a replay to Sentry when an error occurs. The remainder of the replay will behave similarly to a whole-session replay. | ||
## Configuration | ||
@@ -84,0 +104,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
532644
5938
153
0