tracker: option to disable network

This commit is contained in:
nick-delirium 2025-02-10 10:03:27 +01:00
parent 3e722ea5ba
commit c7523a1526
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
4 changed files with 9 additions and 2 deletions

View file

@ -2,6 +2,7 @@
- update medv/finder to 4.0.2 for better support of css-in-js libs
- fixes for single tab recording
- add option to disable network completely `{ network: { disabled: true } }`
## 15.0.4

View file

@ -1,7 +1,7 @@
{
"name": "@openreplay/tracker",
"description": "The OpenReplay tracker main package",
"version": "15.0.5-beta.0",
"version": "15.0.5",
"keywords": [
"logging",
"replay"

View file

@ -201,7 +201,9 @@ export default class API {
Timing(app, options)
Focus(app)
Fonts(app)
Network(app, options.network)
if (!options.network.disabled) {
Network(app, options.network)
}
Selection(app)
;(window as any).__OPENREPLAY__ = this

View file

@ -57,9 +57,13 @@ export interface Options {
axiosInstances?: Array<AxiosInstance>
useProxy?: boolean
tokenUrlMatcher?: (url: string) => boolean
disabled?: boolean
}
export default function (app: App, opts: Partial<Options> = {}) {
if (opts.disabled) {
return
}
const options: Options = Object.assign(
{
failuresOnly: false,