Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/replay

Package Overview
Dependencies
Maintainers
12
Versions
235
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/replay - npm Package Compare versions

Comparing version 0.5.23 to 0.6.0

8

dist/src/index.d.ts

@@ -6,3 +6,3 @@ import { Breadcrumb, Event, Integration } from '@sentry/types';

import { IEventBuffer } from './eventBuffer';
import type { AllPerformanceEntry, InstrumentationTypeBreadcrumb, InstrumentationTypeSpan, RecordedEvents, RecordingConfig, RecordingEvent, ReplayRequest, SentryReplayConfiguration, SentryReplayPluginOptions } from './types';
import type { AllPerformanceEntry, InstrumentationTypeBreadcrumb, InstrumentationTypeSpan, RecordedEvents, RecordingConfig, RecordingEvent, ReplayConfiguration, ReplayPluginOptions, ReplayRequest } from './types';
/**

@@ -12,3 +12,3 @@ * Returns true to return control to calling function, otherwise continue with normal batching

declare type AddUpdateCallback = () => boolean | void;
export declare class SentryReplay implements Integration {
export declare class Replay implements Integration {
/**

@@ -31,3 +31,3 @@ * @inheritDoc

readonly recordingOptions: RecordingConfig;
readonly options: SentryReplayPluginOptions;
readonly options: ReplayPluginOptions;
private performanceObserver;

@@ -62,3 +62,3 @@ private retryCount;

session: Session | undefined;
constructor({ flushMinDelay, flushMaxDelay, initialFlushDelay, stickySession, useCompression, captureOnlyOnError, replaysSamplingRate, maskAllText, recordingConfig: { maskAllInputs, blockClass, ignoreClass, maskTextClass, ...recordingOptions }, }?: SentryReplayConfiguration);
constructor({ flushMinDelay, flushMaxDelay, initialFlushDelay, stickySession, useCompression, captureOnlyOnError, replaysSamplingRate, maskAllText, recordingConfig: { maskAllInputs, blockClass, ignoreClass, maskTextClass, ...recordingOptions }, }?: ReplayConfiguration);
/**

@@ -65,0 +65,0 @@ * Because we create a transaction in `setupOnce`, we can potentially create a

@@ -36,3 +36,3 @@ import { record } from 'rrweb';

}
export interface SentryReplayPluginOptions {
export interface ReplayPluginOptions {
/**

@@ -73,3 +73,3 @@ * The amount of time to wait before sending a replay

}
export interface SentryReplayConfiguration extends SentryReplayPluginOptions {
export interface ReplayConfiguration extends ReplayPluginOptions {
/**

@@ -76,0 +76,0 @@ * Options for `rrweb.record()`

@@ -7,4 +7,4 @@ declare const logger: {

enable(): void;
info: (...args: unknown[]) => void;
debug: (...args: unknown[]) => void;
info: (...args: unknown[]) => void;
assert: (...args: unknown[]) => void;

@@ -11,0 +11,0 @@ trace: (...args: unknown[]) => void;

import { BrowserOptions } from '@sentry/browser';
import { SentryReplay } from '@';
import { SentryReplayConfiguration } from '@/types';
import { Replay } from '@';
import { ReplayConfiguration } from '@/types';
interface MockSdkParams {
replayOptions?: SentryReplayConfiguration;
replayOptions?: ReplayConfiguration;
sentryOptions?: BrowserOptions;
}
export declare function mockSdk({ replayOptions, sentryOptions, }?: MockSdkParams): {
replay: SentryReplay;
replay: Replay;
};
export {};

@@ -6,3 +6,3 @@ import { Breadcrumb, Event, Integration } from '@sentry/types';

import { IEventBuffer } from './eventBuffer';
import type { AllPerformanceEntry, InstrumentationTypeBreadcrumb, InstrumentationTypeSpan, RecordedEvents, RecordingConfig, RecordingEvent, ReplayRequest, SentryReplayConfiguration, SentryReplayPluginOptions } from './types';
import type { AllPerformanceEntry, InstrumentationTypeBreadcrumb, InstrumentationTypeSpan, RecordedEvents, RecordingConfig, RecordingEvent, ReplayConfiguration, ReplayPluginOptions, ReplayRequest } from './types';
/**

@@ -12,3 +12,3 @@ * Returns true to return control to calling function, otherwise continue with normal batching

declare type AddUpdateCallback = () => boolean | void;
export declare class SentryReplay implements Integration {
export declare class Replay implements Integration {
/**

@@ -31,3 +31,3 @@ * @inheritDoc

readonly recordingOptions: RecordingConfig;
readonly options: SentryReplayPluginOptions;
readonly options: ReplayPluginOptions;
private performanceObserver;

@@ -62,3 +62,3 @@ private retryCount;

session: Session | undefined;
constructor({ flushMinDelay, flushMaxDelay, initialFlushDelay, stickySession, useCompression, captureOnlyOnError, replaysSamplingRate, maskAllText, recordingConfig: { maskAllInputs, blockClass, ignoreClass, maskTextClass, ...recordingOptions }, }?: SentryReplayConfiguration);
constructor({ flushMinDelay, flushMaxDelay, initialFlushDelay, stickySession, useCompression, captureOnlyOnError, replaysSamplingRate, maskAllText, recordingConfig: { maskAllInputs, blockClass, ignoreClass, maskTextClass, ...recordingOptions }, }?: ReplayConfiguration);
/**

@@ -65,0 +65,0 @@ * Because we create a transaction in `setupOnce`, we can potentially create a

@@ -36,3 +36,3 @@ import { record } from 'rrweb';

}
export interface SentryReplayPluginOptions {
export interface ReplayPluginOptions {
/**

@@ -73,3 +73,3 @@ * The amount of time to wait before sending a replay

}
export interface SentryReplayConfiguration extends SentryReplayPluginOptions {
export interface ReplayConfiguration extends ReplayPluginOptions {
/**

@@ -76,0 +76,0 @@ * Options for `rrweb.record()`

{
"name": "@sentry/replay",
"version": "0.5.23",
"version": "0.6.0",
"description": "User replays for Sentry",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -30,6 +30,5 @@ # sentry-replay

```javascript
import * as Sentry from '@sentry/browser';
import { SentryReplay } from '@sentry/replay';
import { Replay } from '@sentry/replay';

@@ -39,4 +38,4 @@ Sentry.init({

integrations: [
new SentryReplay({
maskAllText: true, // Will mask all text strings
new Replay({
maskAllText: true, // Will mask all text strings
recordingConfig: {

@@ -51,3 +50,3 @@ maskAllInputs: false, // Default is true

### Stop Recording
### Stop Recording

@@ -57,9 +56,7 @@ Replay recording only starts automatically when it is included in the `integrations` key when calling `Sentry.init`. Otherwise you can initialize the plugin and manually call the `start()` method on the integration instance. To stop recording you can call the `stop()`.

```javascript
const replay = new Replay(); // This will *NOT* begin recording replays
const replay = new SentryReplay(); // This will *NOT* begin recording replays
replay.start(); // Start recording
replay.stop(); // Stop recording
```

@@ -69,15 +66,15 @@

| key | type | default | description |
| --- | ---- | ------- | ----------- |
| `flushMinDelay` | `number` | `5000` | The minimum time to wait (in ms) before sending the recording payload. The payload is sent if `flushMinDelay` ms have elapsed between two events. |
| `flushMaxDelay` | `number` | `15000` | The maximum time to wait (in ms) when sending the recording payload. The payload is sent if events occur at an interval less than `flushMinDelay` and `flushMaxDelay` ms have elapsed since the last time a payload was sent. |
| `initialFlushDelay` | `number` | `5000` | The amount of time to wait (in ms) before sending the initial recording payload. This helps drop recordings where users visit and close the page quickly. |
| `maskAllText` | `boolean` | `false` | Mask *all* text strings with `*`. |
| `replaysSamplingRate` | `number` | `1.0` | The rate at which to sample replays. (1.0 will collect all replays, 0 will collect no replays). |
| `stickySession` | `boolean` | `true` | Keep track of the user across page loads. Note a single user using multiple tabs will result in multiple sessions. Closing a tab will result in the session being closed as well. |
| `useCompression` | `boolean` | `true` | Uses `WebWorkers` (if available) to compress the recording payload before uploading to Sentry. |
| `captureOnlyOnError` | `boolean` | `false` | Only capture the recording when an error happens. |
| `recordingConfig.maskAllInputs` | `boolean` | `true` | Mask all `<input>` elements |
| `recordingConfig.blockClass` | `string` | `'sentry-block'` | Redact all elements with the class name `sentry-block` |
| `recordingConfig.ignoreClass` | `string` | `'sentry-ignore'` | Ignores all elements with the class name `sentry-ignore` |
| `recordingConfig.maskTextClass` | `string` | `'sentry-mask'` | Mask all elements with the class name `sentry-ignore` |
| key | type | default | description |
| ------------------------------- | --------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `flushMinDelay` | `number` | `5000` | The minimum time to wait (in ms) before sending the recording payload. The payload is sent if `flushMinDelay` ms have elapsed between two events. |
| `flushMaxDelay` | `number` | `15000` | The maximum time to wait (in ms) when sending the recording payload. The payload is sent if events occur at an interval less than `flushMinDelay` and `flushMaxDelay` ms have elapsed since the last time a payload was sent. |
| `initialFlushDelay` | `number` | `5000` | The amount of time to wait (in ms) before sending the initial recording payload. This helps drop recordings where users visit and close the page quickly. |
| `maskAllText` | `boolean` | `false` | Mask _all_ text strings with `*`. |
| `replaysSamplingRate` | `number` | `1.0` | The rate at which to sample replays. (1.0 will collect all replays, 0 will collect no replays). |
| `stickySession` | `boolean` | `true` | Keep track of the user across page loads. Note a single user using multiple tabs will result in multiple sessions. Closing a tab will result in the session being closed as well. |
| `useCompression` | `boolean` | `true` | Uses `WebWorkers` (if available) to compress the recording payload before uploading to Sentry. |
| `captureOnlyOnError` | `boolean` | `false` | Only capture the recording when an error happens. |
| `recordingConfig.maskAllInputs` | `boolean` | `true` | Mask all `<input>` elements |
| `recordingConfig.blockClass` | `string` | `'sentry-block'` | Redact all elements with the class name `sentry-block` |
| `recordingConfig.ignoreClass` | `string` | `'sentry-ignore'` | Ignores all elements with the class name `sentry-ignore` |
| `recordingConfig.maskTextClass` | `string` | `'sentry-mask'` | Mask all elements with the class name `sentry-ignore` |

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc