@newrelic/browser-agent 1.324.0-rc.0 → 1.324.0-rc.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -72,8 +72,6 @@ exports.default = void 0;
72
72
  * @property {boolean} [session_replay.autoStart] - If true, the agent will automatically start the session replay feature. Otherwise, it will be in a deferred state until the `start` API method is called.
73
73
  * @property {boolean} [session_replay.enabled] - Turn on/off the session replay feature (off by default).
74
74
  * @property {boolean} [session_replay.preload] - If true, allow the agent to run rrweb recorder immediately instead of waiting until after the window.load event, for new sessions. Existing sessions ignore this setting.
75
- * @property {number} [session_replay.sampling_rate] - This setting is deprecated and ineffective. Sampling is controlled in New Relic by server-side configuration.
76
- * @property {number} [session_replay.error_sampling_rate] - This setting is deprecated and ineffective.
77
75
  * @property {boolean} [session_replay.collect_fonts] - When true, serialize fonts for collection without public asset url. This is currently broken -- https://github.com/rrweb-io/rrweb/issues/1304.
78
76
  * @property {boolean} [session_replay.inline_images] - When true, serialize images for collection without public asset url. Not recommended for use. This is currently for TESTING as it easily generates payloads too large to be harvested.
79
77
  * @property {boolean} [session_replay.fix_stylesheets] - When true, tries to fetch any missing stylesheets again to inline in replayer.
@@ -165,8 +165,6 @@ const InitModelFn = () => {
165
165
  autoStart: true,
166
166
  enabled: false,
167
167
  preload: false,
168
- sampling_rate: 10,
169
- error_sampling_rate: 100,
170
168
  collect_fonts: false,
171
169
  inline_images: false,
172
170
  fix_stylesheets: true,
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.RRWEB_PACKAGE_NAME = exports.D
17
17
  /**
18
18
  * Exposes the version of the agent
19
19
  */
20
- const VERSION = exports.VERSION = "1.324.0-rc.0";
20
+ const VERSION = exports.VERSION = "1.324.0-rc.10";
21
21
 
22
22
  /**
23
23
  * Exposes the build type of the agent
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.RRWEB_PACKAGE_NAME = exports.D
17
17
  /**
18
18
  * Exposes the version of the agent
19
19
  */
20
- const VERSION = exports.VERSION = "1.324.0-rc.0";
20
+ const VERSION = exports.VERSION = "1.324.0-rc.10";
21
21
 
22
22
  /**
23
23
  * Exposes the build type of the agent
@@ -90,8 +90,6 @@ class Aggregate extends _aggregateBase.AggregateBase {
90
90
  this.handleError(e);
91
91
  }, this.featureName, this.ee);
92
92
  const {
93
- error_sampling_rate,
94
- sampling_rate,
95
93
  autoStart,
96
94
  block_selector,
97
95
  mask_text_selector,
@@ -131,8 +129,6 @@ class Aggregate extends _aggregateBase.AggregateBase {
131
129
  if (mask_all_inputs !== true) this.reportSupportabilityMetric('Config/SessionReplay/MaskAllInputs/Modified');
132
130
  if (block_selector !== '[data-nr-block]') this.reportSupportabilityMetric('Config/SessionReplay/BlockSelector/Modified');
133
131
  if (mask_text_selector !== '*') this.reportSupportabilityMetric('Config/SessionReplay/MaskTextSelector/Modified');
134
- this.reportSupportabilityMetric('Config/SessionReplay/SamplingRate/Value', sampling_rate);
135
- this.reportSupportabilityMetric('Config/SessionReplay/ErrorSamplingRate/Value', error_sampling_rate);
136
132
  }
137
133
  replayIsActive() {
138
134
  return Boolean(this.recorder && this.mode === _constants2.MODE.FULL && !this.blocked && this.entitled);
@@ -205,11 +205,10 @@ class Recorder {
205
205
  // we are still waiting for an error to throw, so keep wiping the buffer over time
206
206
  this.clearBuffer();
207
207
  }
208
-
209
- // meta event
210
- this.hasSeenMeta ||= this.events.hasMeta ||= event.type === _constants.RRWEB_EVENT_TYPES.Meta;
211
- // snapshot event
212
- this.hasSeenSnapshot ||= this.events.hasSnapshot ||= event.type === _constants.RRWEB_EVENT_TYPES.FullSnapshot;
208
+ this.events.hasMeta ||= event.type === _constants.RRWEB_EVENT_TYPES.Meta;
209
+ this.events.hasSnapshot ||= event.type === _constants.RRWEB_EVENT_TYPES.FullSnapshot;
210
+ this.hasSeenMeta ||= this.events.hasMeta;
211
+ this.hasSeenSnapshot ||= this.events.hasSnapshot;
213
212
 
214
213
  //* dont let the EventBuffer class double evaluate the event data size, it's a performance burden and we have special reasons to do it outside the event buffer */
215
214
  this.events.add(event, eventBytes);
@@ -67,8 +67,6 @@
67
67
  * @property {boolean} [session_replay.autoStart] - If true, the agent will automatically start the session replay feature. Otherwise, it will be in a deferred state until the `start` API method is called.
68
68
  * @property {boolean} [session_replay.enabled] - Turn on/off the session replay feature (off by default).
69
69
  * @property {boolean} [session_replay.preload] - If true, allow the agent to run rrweb recorder immediately instead of waiting until after the window.load event, for new sessions. Existing sessions ignore this setting.
70
- * @property {number} [session_replay.sampling_rate] - This setting is deprecated and ineffective. Sampling is controlled in New Relic by server-side configuration.
71
- * @property {number} [session_replay.error_sampling_rate] - This setting is deprecated and ineffective.
72
70
  * @property {boolean} [session_replay.collect_fonts] - When true, serialize fonts for collection without public asset url. This is currently broken -- https://github.com/rrweb-io/rrweb/issues/1304.
73
71
  * @property {boolean} [session_replay.inline_images] - When true, serialize images for collection without public asset url. Not recommended for use. This is currently for TESTING as it easily generates payloads too large to be harvested.
74
72
  * @property {boolean} [session_replay.fix_stylesheets] - When true, tries to fetch any missing stylesheets again to inline in replayer.
@@ -159,8 +159,6 @@ const InitModelFn = () => {
159
159
  autoStart: true,
160
160
  enabled: false,
161
161
  preload: false,
162
- sampling_rate: 10,
163
- error_sampling_rate: 100,
164
162
  collect_fonts: false,
165
163
  inline_images: false,
166
164
  fix_stylesheets: true,
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * Exposes the version of the agent
13
13
  */
14
- export const VERSION = "1.324.0-rc.0";
14
+ export const VERSION = "1.324.0-rc.10";
15
15
 
16
16
  /**
17
17
  * Exposes the build type of the agent
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * Exposes the version of the agent
13
13
  */
14
- export const VERSION = "1.324.0-rc.0";
14
+ export const VERSION = "1.324.0-rc.10";
15
15
 
16
16
  /**
17
17
  * Exposes the build type of the agent
@@ -86,8 +86,6 @@ export class Aggregate extends AggregateBase {
86
86
  this.handleError(e);
87
87
  }, this.featureName, this.ee);
88
88
  const {
89
- error_sampling_rate,
90
- sampling_rate,
91
89
  autoStart,
92
90
  block_selector,
93
91
  mask_text_selector,
@@ -127,8 +125,6 @@ export class Aggregate extends AggregateBase {
127
125
  if (mask_all_inputs !== true) this.reportSupportabilityMetric('Config/SessionReplay/MaskAllInputs/Modified');
128
126
  if (block_selector !== '[data-nr-block]') this.reportSupportabilityMetric('Config/SessionReplay/BlockSelector/Modified');
129
127
  if (mask_text_selector !== '*') this.reportSupportabilityMetric('Config/SessionReplay/MaskTextSelector/Modified');
130
- this.reportSupportabilityMetric('Config/SessionReplay/SamplingRate/Value', sampling_rate);
131
- this.reportSupportabilityMetric('Config/SessionReplay/ErrorSamplingRate/Value', error_sampling_rate);
132
128
  }
133
129
  replayIsActive() {
134
130
  return Boolean(this.recorder && this.mode === MODE.FULL && !this.blocked && this.entitled);
@@ -198,11 +198,10 @@ export class Recorder {
198
198
  // we are still waiting for an error to throw, so keep wiping the buffer over time
199
199
  this.clearBuffer();
200
200
  }
201
-
202
- // meta event
203
- this.hasSeenMeta ||= this.events.hasMeta ||= event.type === RRWEB_EVENT_TYPES.Meta;
204
- // snapshot event
205
- this.hasSeenSnapshot ||= this.events.hasSnapshot ||= event.type === RRWEB_EVENT_TYPES.FullSnapshot;
201
+ this.events.hasMeta ||= event.type === RRWEB_EVENT_TYPES.Meta;
202
+ this.events.hasSnapshot ||= event.type === RRWEB_EVENT_TYPES.FullSnapshot;
203
+ this.hasSeenMeta ||= this.events.hasMeta;
204
+ this.hasSeenSnapshot ||= this.events.hasSnapshot;
206
205
 
207
206
  //* dont let the EventBuffer class double evaluate the event data size, it's a performance burden and we have special reasons to do it outside the event buffer */
208
207
  this.events.add(event, eventBytes);
@@ -199,14 +199,6 @@ export type Init = {
199
199
  * - If true, allow the agent to run rrweb recorder immediately instead of waiting until after the window.load event, for new sessions. Existing sessions ignore this setting.
200
200
  */
201
201
  preload?: boolean | undefined;
202
- /**
203
- * - This setting is deprecated and ineffective. Sampling is controlled in New Relic by server-side configuration.
204
- */
205
- sampling_rate?: number | undefined;
206
- /**
207
- * - This setting is deprecated and ineffective.
208
- */
209
- error_sampling_rate?: number | undefined;
210
202
  /**
211
203
  * - When true, serialize fonts for collection without public asset url. This is currently broken -- https://github.com/rrweb-io/rrweb/issues/1304.
212
204
  */
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init.js"],"names":[],"mappings":"AA4JO,0CAEN;mBAlJY,OAAO,cAAc,EAAE,IAAI"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init.js"],"names":[],"mappings":"AA0JO,0CAEN;mBAhJY,OAAO,cAAc,EAAE,IAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/aggregate/index.js"],"names":[],"mappings":"AA2BA;IACE,2BAAiC;IAIjC,sCA+FC;IAlGD,WAAW;IAOT,uBAA0D;IAE1D,iFAAiF;IACjF,qBAAwB;IAGxB,2CAA2C;IAC3C,sDAAwB;IACxB,6CAA6C;IAC7C,gDAAmB;IACnB,+DAA+D;IAC/D,wBAA0B;IAE1B,0BAA0B;IAC1B,kBAAqB;IACrB,6CAA6C;IAC7C,gBAA2B;IAE3B,qBAA2B;IAE3B,cAA8C;IAI9C,kCAAqG;IAqEvG,0BAEC;IAED,0BAMC;IAED,qBAeC;IAED;;;;;;OAMG;IACH,4BALW,OAAO,iBACP,OAAO;;;;;;QAEL,IAAI,CA+ChB;IAED,2BAUC;IAED,0BA0CC;IAED;;;;OAIG;IACH,6BAHW,MAAM,EAAE,GACN;QAAE,UAAU,EAAE,MAAM,GAAC,SAAS,CAAC;QAAC,SAAS,EAAE,MAAM,GAAC,SAAS,CAAA;KAAE,CAUzE;IAED;;;;;;;;;;MAsEC;IAED,sCAcC;IAED;;;;OAIG;IACH,mCAKC;IAED,yDAAyD;IACzD,+CASC;;CAOF;8BAtY6B,4BAA4B;2BAe/B,gCAAgC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/aggregate/index.js"],"names":[],"mappings":"AA2BA;IACE,2BAAiC;IAIjC,sCA4FC;IA/FD,WAAW;IAOT,uBAA0D;IAE1D,iFAAiF;IACjF,qBAAwB;IAGxB,2CAA2C;IAC3C,sDAAwB;IACxB,6CAA6C;IAC7C,gDAAmB;IACnB,+DAA+D;IAC/D,wBAA0B;IAE1B,0BAA0B;IAC1B,kBAAqB;IACrB,6CAA6C;IAC7C,gBAA2B;IAE3B,qBAA2B;IAE3B,cAA8C;IAI9C,kCAAqG;IAkEvG,0BAEC;IAED,0BAMC;IAED,qBAeC;IAED;;;;;;OAMG;IACH,4BALW,OAAO,iBACP,OAAO;;;;;;QAEL,IAAI,CA+ChB;IAED,2BAUC;IAED,0BA0CC;IAED;;;;OAIG;IACH,6BAHW,MAAM,EAAE,GACN;QAAE,UAAU,EAAE,MAAM,GAAC,SAAS,CAAC;QAAC,SAAS,EAAE,MAAM,GAAC,SAAS,CAAA;KAAE,CAUzE;IAED;;;;;;;;;;MAsEC;IAED,sCAcC;IAED;;;;OAIG;IACH,mCAKC;IAED,yDAAyD;IACzD,+CASC;;CAOF;8BAnY6B,4BAA4B;2BAe/B,gCAAgC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newrelic/browser-agent",
3
- "version": "1.324.0-rc.0",
3
+ "version": "1.324.0-rc.10",
4
4
  "private": false,
5
5
  "author": "New Relic Browser Agent Team <browser-agent@newrelic.com>",
6
6
  "description": "New Relic Browser Agent",
@@ -204,6 +204,7 @@
204
204
  "cdn:webpack": "npx webpack --progress --config ./tools/webpack/index.mjs",
205
205
  "cdn:watch": "jung -r ./src -F '.*\\.test\\.js' --run -- npm run cdn:build:local",
206
206
  "test-server": "node ./tools/wdio/bin/server",
207
+ "electron:open": "node tools/local-browsers/electron/open.mjs",
207
208
  "lt:update-browsers": "node ./tools/browsers-lists/lt-update-supported.mjs",
208
209
  "lt:upload-webview-assets": "node ./tools/lambda-test/upload-webview-assets.mjs",
209
210
  "build:frameworks": "npm run build:npm && npm --prefix ./tools/test-builds run build-frameworks",
@@ -227,7 +228,7 @@
227
228
  },
228
229
  "dependencies": {
229
230
  "@newrelic/rrweb": "^1.1.2",
230
- "fflate": "0.8.2",
231
+ "fflate": "0.8.3",
231
232
  "web-vitals": "6.2.1"
232
233
  },
233
234
  "devDependencies": {
@@ -67,8 +67,6 @@
67
67
  * @property {boolean} [session_replay.autoStart] - If true, the agent will automatically start the session replay feature. Otherwise, it will be in a deferred state until the `start` API method is called.
68
68
  * @property {boolean} [session_replay.enabled] - Turn on/off the session replay feature (off by default).
69
69
  * @property {boolean} [session_replay.preload] - If true, allow the agent to run rrweb recorder immediately instead of waiting until after the window.load event, for new sessions. Existing sessions ignore this setting.
70
- * @property {number} [session_replay.sampling_rate] - This setting is deprecated and ineffective. Sampling is controlled in New Relic by server-side configuration.
71
- * @property {number} [session_replay.error_sampling_rate] - This setting is deprecated and ineffective.
72
70
  * @property {boolean} [session_replay.collect_fonts] - When true, serialize fonts for collection without public asset url. This is currently broken -- https://github.com/rrweb-io/rrweb/issues/1304.
73
71
  * @property {boolean} [session_replay.inline_images] - When true, serialize images for collection without public asset url. Not recommended for use. This is currently for TESTING as it easily generates payloads too large to be harvested.
74
72
  * @property {boolean} [session_replay.fix_stylesheets] - When true, tries to fetch any missing stylesheets again to inline in replayer.
@@ -111,8 +111,6 @@ const InitModelFn = () => {
111
111
  autoStart: true,
112
112
  enabled: false,
113
113
  preload: false,
114
- sampling_rate: 10,
115
- error_sampling_rate: 100,
116
114
  collect_fonts: false,
117
115
  inline_images: false,
118
116
  fix_stylesheets: true,
@@ -92,7 +92,7 @@ export class Aggregate extends AggregateBase {
92
92
  this.handleError(e)
93
93
  }, this.featureName, this.ee)
94
94
 
95
- const { error_sampling_rate, sampling_rate, autoStart, block_selector, mask_text_selector, mask_all_inputs, inline_images, collect_fonts } = agentRef.init.session_replay
95
+ const { autoStart, block_selector, mask_text_selector, mask_all_inputs, inline_images, collect_fonts } = agentRef.init.session_replay
96
96
 
97
97
  this.waitForFlags(['srs', 'sr']).then(([srMode, entitled]) => {
98
98
  this.entitled = !!entitled
@@ -122,9 +122,6 @@ export class Aggregate extends AggregateBase {
122
122
  if (mask_all_inputs !== true) this.reportSupportabilityMetric('Config/SessionReplay/MaskAllInputs/Modified')
123
123
  if (block_selector !== '[data-nr-block]') this.reportSupportabilityMetric('Config/SessionReplay/BlockSelector/Modified')
124
124
  if (mask_text_selector !== '*') this.reportSupportabilityMetric('Config/SessionReplay/MaskTextSelector/Modified')
125
-
126
- this.reportSupportabilityMetric('Config/SessionReplay/SamplingRate/Value', sampling_rate)
127
- this.reportSupportabilityMetric('Config/SessionReplay/ErrorSamplingRate/Value', error_sampling_rate)
128
125
  }
129
126
 
130
127
  replayIsActive () {
@@ -194,10 +194,10 @@ export class Recorder {
194
194
  this.clearBuffer()
195
195
  }
196
196
 
197
- // meta event
198
- this.hasSeenMeta ||= this.events.hasMeta ||= event.type === RRWEB_EVENT_TYPES.Meta
199
- // snapshot event
200
- this.hasSeenSnapshot ||= this.events.hasSnapshot ||= event.type === RRWEB_EVENT_TYPES.FullSnapshot
197
+ this.events.hasMeta ||= event.type === RRWEB_EVENT_TYPES.Meta
198
+ this.events.hasSnapshot ||= event.type === RRWEB_EVENT_TYPES.FullSnapshot
199
+ this.hasSeenMeta ||= this.events.hasMeta
200
+ this.hasSeenSnapshot ||= this.events.hasSnapshot
201
201
 
202
202
  //* dont let the EventBuffer class double evaluate the event data size, it's a performance burden and we have special reasons to do it outside the event buffer */
203
203
  this.events.add(event, eventBytes)