@sentry/replay
Advanced tools
Comparing version 7.58.1 to 7.59.0-beta.0
{ | ||
"name": "@sentry/replay", | ||
"version": "7.58.1", | ||
"version": "7.59.0-beta.0", | ||
"description": "User replays for Sentry", | ||
@@ -28,3 +28,3 @@ "main": "cjs/index.js", | ||
"@babel/core": "^7.17.5", | ||
"@sentry-internal/replay-worker": "7.58.1", | ||
"@sentry-internal/replay-worker": "7.59.0-beta.0", | ||
"@sentry-internal/rrweb": "1.108.0", | ||
@@ -36,5 +36,5 @@ "@sentry-internal/rrweb-snapshot": "1.108.0", | ||
"dependencies": { | ||
"@sentry/core": "7.58.1", | ||
"@sentry/types": "7.58.1", | ||
"@sentry/utils": "7.58.1" | ||
"@sentry/core": "7.59.0-beta.0", | ||
"@sentry/types": "7.59.0-beta.0", | ||
"@sentry/utils": "7.59.0-beta.0" | ||
}, | ||
@@ -41,0 +41,0 @@ "engines": { |
@@ -7,3 +7,2 @@ export declare const WINDOW: import("@sentry/utils").InternalGlobal & Window; | ||
export declare const SESSION_IDLE_PAUSE_DURATION = 300000; | ||
export declare const SESSION_IDLE_EXPIRE_DURATION = 900000; | ||
export declare const MAX_SESSION_LIFE = 3600000; | ||
@@ -10,0 +9,0 @@ /** Default flush delays */ |
@@ -45,6 +45,2 @@ import type { ReplayRecordingMode, Transaction } from '@sentry/types'; | ||
/** | ||
* Timestamp of the last user activity. This lives across sessions. | ||
*/ | ||
private _lastActivity; | ||
/** | ||
* Is the integration currently active? | ||
@@ -148,14 +144,4 @@ */ | ||
/** | ||
* Updates the user activity timestamp and resumes recording. This should be | ||
* called in an event handler for a user action that we consider as the user | ||
* being "active" (e.g. a mouse click). | ||
* Updates the user activity timestamp. | ||
*/ | ||
triggerUserActivity(): void; | ||
/** | ||
* Updates the user activity timestamp *without* resuming | ||
* recording. Some user events (e.g. keydown) can be create | ||
* low-value replays that only contain the keypress as a | ||
* breadcrumb. Instead this would require other events to | ||
* create a new replay after a session has expired. | ||
*/ | ||
updateUserActivity(): void; | ||
@@ -183,11 +169,2 @@ /** | ||
/** | ||
* Checks if recording should be stopped due to user inactivity. Otherwise | ||
* check if session is expired and create a new session if so. Triggers a new | ||
* full snapshot on new session. | ||
* | ||
* Returns true if session is not expired, false otherwise. | ||
* @hidden | ||
*/ | ||
checkAndHandleExpiredSession(): boolean | void; | ||
/** | ||
* Capture some initial state that can change throughout the lifespan of the | ||
@@ -204,2 +181,7 @@ * replay. This is required because otherwise they would be captured at the | ||
/** | ||
* Check the state/expiration of the session. | ||
* The callback is called when the session is neither paused nor expired. | ||
*/ | ||
checkSessionState(onContinue: () => void): void; | ||
/** | ||
* This will get the parametrized route name of the current page. | ||
@@ -210,2 +192,6 @@ * This is only available if performance is enabled, and if an instrumented router is used. | ||
/** | ||
* Initialize a new session. | ||
*/ | ||
private _initializeSession; | ||
/** | ||
* Initialize and start all listeners to varying events (DOM, | ||
@@ -218,6 +204,6 @@ * Performance Observer, Recording, Sentry SDK, etc) | ||
/** | ||
* Loads (or refreshes) the current session. | ||
* Returns false if session is not recorded. | ||
* Refresh a session that has ended, either when it exceeded the max. age or when it was inactive for too long. | ||
* This means there was a sampled & sent session before - this will never be called while the session is buffering. | ||
*/ | ||
private _loadAndCheckSession; | ||
private _refreshSession; | ||
/** | ||
@@ -257,11 +243,2 @@ * Adds listeners to record events for the replay | ||
/** | ||
* Trigger rrweb to take a full snapshot which will cause this plugin to | ||
* create a new Replay event. | ||
*/ | ||
private _triggerFullSnapshot; | ||
/** | ||
* Update user activity (across session lifespans) | ||
*/ | ||
private _updateUserActivity; | ||
/** | ||
* Updates the session's last activity timestamp | ||
@@ -303,2 +280,6 @@ */ | ||
private _flush; | ||
/** | ||
* Flush, while locking so any future flush attemps while this is ongoing are queued. | ||
*/ | ||
private _flushLocked; | ||
/** Save the session, if it is sticky */ | ||
@@ -305,0 +286,0 @@ private _maybeSaveSession; |
@@ -1,2 +0,2 @@ | ||
import type { Sampled, Session, SessionOptions } from '../types'; | ||
import type { Sampled, Session } from '../types'; | ||
/** | ||
@@ -11,3 +11,6 @@ * Get the sampled status for a session based on sample rates & current sampled status. | ||
*/ | ||
export declare function createSession({ sessionSampleRate, allowBuffering, stickySession }: SessionOptions): Session; | ||
export declare function createSession({ sampled, stickySession, }: { | ||
sampled: Sampled; | ||
stickySession: boolean; | ||
}): Session; | ||
//# sourceMappingURL=createSession.d.ts.map |
@@ -20,3 +20,2 @@ import type { Breadcrumb, FetchBreadcrumbHint, HandlerDataFetch, ReplayRecordingData, ReplayRecordingMode, SentryWrappedXMLHttpRequest, Transaction, XhrBreadcrumbHint } from '@sentry/types'; | ||
sessionIdlePause: number; | ||
sessionIdleExpire: number; | ||
maxSessionLife: number; | ||
@@ -172,13 +171,2 @@ } | ||
} | ||
/** | ||
* Session options that are configurable by the integration configuration | ||
*/ | ||
export interface SessionOptions extends Pick<ReplayPluginOptions, 'sessionSampleRate' | 'stickySession'> { | ||
/** | ||
* Should buffer recordings to be saved later either by error sampling, or by | ||
* manually calling `flush()`. This is only a factor if not sampled for a | ||
* session-based replay. | ||
*/ | ||
allowBuffering: boolean; | ||
} | ||
export interface ReplayIntegrationPrivacyOptions { | ||
@@ -293,15 +281,5 @@ /** | ||
/** | ||
* The ID of the previous session. | ||
* If this is empty, there was no previous session. | ||
*/ | ||
previousSessionId?: string; | ||
/** | ||
* Is the session sampled? `false` if not sampled, otherwise, `session` or `buffer` | ||
*/ | ||
sampled: Sampled; | ||
/** | ||
* If this is false, the session should not be refreshed when it was inactive. | ||
* This can be the case if you had a buffered session which is now recording because an error happened. | ||
*/ | ||
shouldRefresh: boolean; | ||
} | ||
@@ -374,3 +352,2 @@ export type EventBufferType = 'sync' | 'worker'; | ||
cancelFlush(): void; | ||
triggerUserActivity(): void; | ||
updateUserActivity(): void; | ||
@@ -380,3 +357,3 @@ addUpdate(cb: AddUpdateCallback): void; | ||
getSessionId(): string | undefined; | ||
checkAndHandleExpiredSession(): boolean | void; | ||
checkSessionState(onContinue: () => void): void; | ||
setInitialState(): void; | ||
@@ -383,0 +360,0 @@ getCurrentRoute(): string | undefined; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
153
2113283
17301
1
+ Added@sentry/core@7.59.0-beta.0(transitive)
+ Added@sentry/types@7.59.0-beta.0(transitive)
+ Added@sentry/utils@7.59.0-beta.0(transitive)
- Removed@sentry/core@7.58.1(transitive)
- Removed@sentry/types@7.58.1(transitive)
- Removed@sentry/utils@7.58.1(transitive)
Updated@sentry/core@7.59.0-beta.0
Updated@sentry/types@7.59.0-beta.0
Updated@sentry/utils@7.59.0-beta.0