MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / constructor

Method constructor

packages/replay-internal/src/integration.ts:116–244  ·  view source on GitHub ↗
({
    flushMinDelay = DEFAULT_FLUSH_MIN_DELAY,
    flushMaxDelay = DEFAULT_FLUSH_MAX_DELAY,
    minReplayDuration = MIN_REPLAY_DURATION,
    maxReplayDuration = MAX_REPLAY_DURATION,
    stickySession = true,
    useCompression = true,
    workerUrl,
    _experiments = {},
    maskAllText = true,
    maskAllInputs = true,
    blockAllMedia = true,

    mutationBreadcrumbLimit = 750,
    mutationLimit = 10_000,

    slowClickTimeout = 7_000,
    slowClickIgnoreSelectors = [],

    networkDetailAllowUrls = [],
    networkDetailDenyUrls = [],
    networkCaptureBodies = true,
    networkRequestHeaders = [],
    networkResponseHeaders = [],

    mask = [],
    maskAttributes = ['title', 'placeholder', 'aria-label'],
    unmask = [],
    block = [],
    unblock = [],
    ignore = [],
    maskFn,

    beforeAddRecordingEvent,
    beforeErrorSampling,
    onError,
    attachRawBodyFromRequest = false,
  }: ReplayConfiguration = {})

Source from the content-addressed store, hash-verified

114 private _replay?: ReplayContainer;
115
116 public constructor({
117 flushMinDelay = DEFAULT_FLUSH_MIN_DELAY,
118 flushMaxDelay = DEFAULT_FLUSH_MAX_DELAY,
119 minReplayDuration = MIN_REPLAY_DURATION,
120 maxReplayDuration = MAX_REPLAY_DURATION,
121 stickySession = true,
122 useCompression = true,
123 workerUrl,
124 _experiments = {},
125 maskAllText = true,
126 maskAllInputs = true,
127 blockAllMedia = true,
128
129 mutationBreadcrumbLimit = 750,
130 mutationLimit = 10_000,
131
132 slowClickTimeout = 7_000,
133 slowClickIgnoreSelectors = [],
134
135 networkDetailAllowUrls = [],
136 networkDetailDenyUrls = [],
137 networkCaptureBodies = true,
138 networkRequestHeaders = [],
139 networkResponseHeaders = [],
140
141 mask = [],
142 maskAttributes = ['title', 'placeholder', 'aria-label'],
143 unmask = [],
144 block = [],
145 unblock = [],
146 ignore = [],
147 maskFn,
148
149 beforeAddRecordingEvent,
150 beforeErrorSampling,
151 onError,
152 attachRawBodyFromRequest = false,
153 }: ReplayConfiguration = {}) {
154 this.name = 'Replay';
155
156 const privacyOptions = getPrivacyOptions({
157 mask,
158 unmask,
159 block,
160 unblock,
161 ignore,
162 });
163
164 this._recordingOptions = {
165 maskAllInputs,
166 maskAllText,
167 maskInputOptions: { password: true },
168 maskTextFn: maskFn,
169 maskInputFn: maskFn,
170 maskAttributeFn: (key: string, value: string, el: HTMLElement): string =>
171 maskAttribute({
172 maskAttributes,
173 maskAllText,

Callers

nothing calls this directly

Calls 4

getPrivacyOptionsFunction · 0.90
maskAttributeFunction · 0.90
isBrowserFunction · 0.90
_getMergedNetworkHeadersFunction · 0.85

Tested by

no test coverage detected