@newrelic/browser-agent 1.265.0 → 1.265.1

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.265.1](https://github.com/newrelic/newrelic-browser-agent/compare/v1.265.0...v1.265.1) (2024-09-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Disable websocket wrapping ([#1176](https://github.com/newrelic/newrelic-browser-agent/issues/1176)) ([5f8a0c4](https://github.com/newrelic/newrelic-browser-agent/commit/5f8a0c42fbade8f6f81471439ecc8999b1556290))
12
+
6
13
  ## [1.265.0](https://github.com/newrelic/newrelic-browser-agent/compare/v1.264.0...v1.265.0) (2024-08-30)
7
14
 
8
15
 
@@ -12,7 +12,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
12
12
  /**
13
13
  * Exposes the version of the agent
14
14
  */
15
- const VERSION = exports.VERSION = "1.265.0";
15
+ const VERSION = exports.VERSION = "1.265.1";
16
16
 
17
17
  /**
18
18
  * Exposes the build type of the agent
@@ -12,7 +12,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
12
12
  /**
13
13
  * Exposes the version of the agent
14
14
  */
15
- const VERSION = exports.VERSION = "1.265.0";
15
+ const VERSION = exports.VERSION = "1.265.1";
16
16
 
17
17
  /**
18
18
  * Exposes the build type of the agent
@@ -16,8 +16,9 @@ var _eventListenerOpts = require("../../../common/event-listener/event-listener-
16
16
  var _runtime2 = require("../../../common/constants/runtime");
17
17
  var _aggregateBase = require("../../utils/aggregate-base");
18
18
  var _drain = require("../../../common/drain/drain");
19
- var _wrapWebsocket = require("../../../common/wrap/wrap-websocket");
20
- var _websocketDetection = require("./websocket-detection");
19
+ // import { WEBSOCKET_TAG } from '../../../common/wrap/wrap-websocket'
20
+ // import { handleWebsocketEvents } from './websocket-detection'
21
+
21
22
  class Aggregate extends _aggregateBase.AggregateBase {
22
23
  static featureName = _constants.FEATURE_NAME;
23
24
  constructor(agentIdentifier, aggregator) {
@@ -136,11 +137,12 @@ class Aggregate extends _aggregateBase.AggregateBase {
136
137
  subtree: true
137
138
  });
138
139
  }
139
- _constants.WATCHABLE_WEB_SOCKET_EVENTS.forEach(tag => {
140
- (0, _registerHandler.registerHandler)('buffered-' + _wrapWebsocket.WEBSOCKET_TAG + tag, (...args) => {
141
- (0, _websocketDetection.handleWebsocketEvents)(this.storeSupportabilityMetrics.bind(this), tag, ...args);
142
- }, this.featureName, this.ee);
143
- });
140
+
141
+ // WATCHABLE_WEB_SOCKET_EVENTS.forEach(tag => {
142
+ // registerHandler('buffered-' + WEBSOCKET_TAG + tag, (...args) => {
143
+ // handleWebsocketEvents(this.storeSupportabilityMetrics.bind(this), tag, ...args)
144
+ // }, this.featureName, this.ee)
145
+ // })
144
146
  }
145
147
  eachSessionChecks() {
146
148
  if (!_runtime2.isBrowserScope) return;
@@ -3,12 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.WATCHABLE_WEB_SOCKET_EVENTS = exports.SUPPORTABILITY_METRIC_CHANNEL = exports.SUPPORTABILITY_METRIC = exports.FEATURE_NAME = exports.CUSTOM_METRIC_CHANNEL = exports.CUSTOM_METRIC = void 0;
7
- var _wrapWebsocket = require("../../common/wrap/wrap-websocket");
6
+ exports.SUPPORTABILITY_METRIC_CHANNEL = exports.SUPPORTABILITY_METRIC = exports.FEATURE_NAME = exports.CUSTOM_METRIC_CHANNEL = exports.CUSTOM_METRIC = void 0;
8
7
  var _features = require("../../loaders/features/features");
8
+ // import { ADD_EVENT_LISTENER_TAG } from '../../common/wrap/wrap-websocket'
9
+
9
10
  const FEATURE_NAME = exports.FEATURE_NAME = _features.FEATURE_NAMES.metrics;
10
11
  const SUPPORTABILITY_METRIC = exports.SUPPORTABILITY_METRIC = 'sm';
11
12
  const CUSTOM_METRIC = exports.CUSTOM_METRIC = 'cm';
12
13
  const SUPPORTABILITY_METRIC_CHANNEL = exports.SUPPORTABILITY_METRIC_CHANNEL = 'storeSupportabilityMetrics';
13
14
  const CUSTOM_METRIC_CHANNEL = exports.CUSTOM_METRIC_CHANNEL = 'storeEventMetrics';
14
- const WATCHABLE_WEB_SOCKET_EVENTS = exports.WATCHABLE_WEB_SOCKET_EVENTS = ['new', 'send', 'close', _wrapWebsocket.ADD_EVENT_LISTENER_TAG];
15
+
16
+ // export const WATCHABLE_WEB_SOCKET_EVENTS = ['new', 'send', 'close', ADD_EVENT_LISTENER_TAG]
@@ -4,20 +4,23 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Metrics = exports.Instrument = void 0;
7
- var _handle = require("../../../common/event-emitter/handle");
8
- var _wrapWebsocket = require("../../../common/wrap/wrap-websocket");
9
7
  var _instrumentBase = require("../../utils/instrument-base");
10
8
  var _constants = require("../constants");
9
+ // import { handle } from '../../../common/event-emitter/handle'
10
+ // import { WEBSOCKET_TAG, wrapWebSocket } from '../../../common/wrap/wrap-websocket'
11
+
11
12
  class Instrument extends _instrumentBase.InstrumentBase {
12
13
  static featureName = _constants.FEATURE_NAME;
13
14
  constructor(agentIdentifier, aggregator, auto = true) {
14
15
  super(agentIdentifier, aggregator, _constants.FEATURE_NAME, auto);
15
- (0, _wrapWebsocket.wrapWebSocket)(this.ee);
16
- _constants.WATCHABLE_WEB_SOCKET_EVENTS.forEach(suffix => {
17
- this.ee.on(_wrapWebsocket.WEBSOCKET_TAG + suffix, (...args) => {
18
- (0, _handle.handle)('buffered-' + _wrapWebsocket.WEBSOCKET_TAG + suffix, [...args], undefined, this.featureName, this.ee);
19
- });
20
- });
16
+ // wrapWebSocket(this.ee)
17
+
18
+ // WATCHABLE_WEB_SOCKET_EVENTS.forEach((suffix) => {
19
+ // this.ee.on(WEBSOCKET_TAG + suffix, (...args) => {
20
+ // handle('buffered-' + WEBSOCKET_TAG + suffix, [...args], undefined, this.featureName, this.ee)
21
+ // })
22
+ // })
23
+
21
24
  this.importAggregator();
22
25
  }
23
26
  }
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * Exposes the version of the agent
8
8
  */
9
- export const VERSION = "1.265.0";
9
+ export const VERSION = "1.265.1";
10
10
 
11
11
  /**
12
12
  * Exposes the build type of the agent
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * Exposes the version of the agent
8
8
  */
9
- export const VERSION = "1.265.0";
9
+ export const VERSION = "1.265.1";
10
10
 
11
11
  /**
12
12
  * Exposes the build type of the agent
@@ -2,7 +2,7 @@ import { getConfiguration } from '../../../common/config/init';
2
2
  import { getRuntime } from '../../../common/config/runtime';
3
3
  import { registerHandler } from '../../../common/event-emitter/register-handler';
4
4
  import { HarvestScheduler } from '../../../common/harvest/harvest-scheduler';
5
- import { FEATURE_NAME, SUPPORTABILITY_METRIC, CUSTOM_METRIC, SUPPORTABILITY_METRIC_CHANNEL, CUSTOM_METRIC_CHANNEL, WATCHABLE_WEB_SOCKET_EVENTS } from '../constants';
5
+ import { FEATURE_NAME, SUPPORTABILITY_METRIC, CUSTOM_METRIC, SUPPORTABILITY_METRIC_CHANNEL, CUSTOM_METRIC_CHANNEL /*, WATCHABLE_WEB_SOCKET_EVENTS */ } from '../constants';
6
6
  import { getFrameworks } from './framework-detection';
7
7
  import { isFileProtocol } from '../../../common/url/protocol';
8
8
  import { onDOMContentLoaded } from '../../../common/window/load';
@@ -10,8 +10,9 @@ import { windowAddEventListener } from '../../../common/event-listener/event-lis
10
10
  import { isBrowserScope, isWorkerScope } from '../../../common/constants/runtime';
11
11
  import { AggregateBase } from '../../utils/aggregate-base';
12
12
  import { deregisterDrain } from '../../../common/drain/drain';
13
- import { WEBSOCKET_TAG } from '../../../common/wrap/wrap-websocket';
14
- import { handleWebsocketEvents } from './websocket-detection';
13
+ // import { WEBSOCKET_TAG } from '../../../common/wrap/wrap-websocket'
14
+ // import { handleWebsocketEvents } from './websocket-detection'
15
+
15
16
  export class Aggregate extends AggregateBase {
16
17
  static featureName = FEATURE_NAME;
17
18
  constructor(agentIdentifier, aggregator) {
@@ -130,11 +131,12 @@ export class Aggregate extends AggregateBase {
130
131
  subtree: true
131
132
  });
132
133
  }
133
- WATCHABLE_WEB_SOCKET_EVENTS.forEach(tag => {
134
- registerHandler('buffered-' + WEBSOCKET_TAG + tag, (...args) => {
135
- handleWebsocketEvents(this.storeSupportabilityMetrics.bind(this), tag, ...args);
136
- }, this.featureName, this.ee);
137
- });
134
+
135
+ // WATCHABLE_WEB_SOCKET_EVENTS.forEach(tag => {
136
+ // registerHandler('buffered-' + WEBSOCKET_TAG + tag, (...args) => {
137
+ // handleWebsocketEvents(this.storeSupportabilityMetrics.bind(this), tag, ...args)
138
+ // }, this.featureName, this.ee)
139
+ // })
138
140
  }
139
141
  eachSessionChecks() {
140
142
  if (!isBrowserScope) return;
@@ -1,8 +1,9 @@
1
- import { ADD_EVENT_LISTENER_TAG } from '../../common/wrap/wrap-websocket';
1
+ // import { ADD_EVENT_LISTENER_TAG } from '../../common/wrap/wrap-websocket'
2
2
  import { FEATURE_NAMES } from '../../loaders/features/features';
3
3
  export const FEATURE_NAME = FEATURE_NAMES.metrics;
4
4
  export const SUPPORTABILITY_METRIC = 'sm';
5
5
  export const CUSTOM_METRIC = 'cm';
6
6
  export const SUPPORTABILITY_METRIC_CHANNEL = 'storeSupportabilityMetrics';
7
7
  export const CUSTOM_METRIC_CHANNEL = 'storeEventMetrics';
8
- export const WATCHABLE_WEB_SOCKET_EVENTS = ['new', 'send', 'close', ADD_EVENT_LISTENER_TAG];
8
+
9
+ // export const WATCHABLE_WEB_SOCKET_EVENTS = ['new', 'send', 'close', ADD_EVENT_LISTENER_TAG]
@@ -1,17 +1,19 @@
1
- import { handle } from '../../../common/event-emitter/handle';
2
- import { WEBSOCKET_TAG, wrapWebSocket } from '../../../common/wrap/wrap-websocket';
1
+ // import { handle } from '../../../common/event-emitter/handle'
2
+ // import { WEBSOCKET_TAG, wrapWebSocket } from '../../../common/wrap/wrap-websocket'
3
3
  import { InstrumentBase } from '../../utils/instrument-base';
4
- import { FEATURE_NAME, WATCHABLE_WEB_SOCKET_EVENTS } from '../constants';
4
+ import { FEATURE_NAME /*, WATCHABLE_WEB_SOCKET_EVENTS */ } from '../constants';
5
5
  export class Instrument extends InstrumentBase {
6
6
  static featureName = FEATURE_NAME;
7
7
  constructor(agentIdentifier, aggregator, auto = true) {
8
8
  super(agentIdentifier, aggregator, FEATURE_NAME, auto);
9
- wrapWebSocket(this.ee);
10
- WATCHABLE_WEB_SOCKET_EVENTS.forEach(suffix => {
11
- this.ee.on(WEBSOCKET_TAG + suffix, (...args) => {
12
- handle('buffered-' + WEBSOCKET_TAG + suffix, [...args], undefined, this.featureName, this.ee);
13
- });
14
- });
9
+ // wrapWebSocket(this.ee)
10
+
11
+ // WATCHABLE_WEB_SOCKET_EVENTS.forEach((suffix) => {
12
+ // this.ee.on(WEBSOCKET_TAG + suffix, (...args) => {
13
+ // handle('buffered-' + WEBSOCKET_TAG + suffix, [...args], undefined, this.featureName, this.ee)
14
+ // })
15
+ // })
16
+
15
17
  this.importAggregator();
16
18
  }
17
19
  }
@@ -3,5 +3,4 @@ export const SUPPORTABILITY_METRIC: "sm";
3
3
  export const CUSTOM_METRIC: "cm";
4
4
  export const SUPPORTABILITY_METRIC_CHANNEL: "storeSupportabilityMetrics";
5
5
  export const CUSTOM_METRIC_CHANNEL: "storeEventMetrics";
6
- export const WATCHABLE_WEB_SOCKET_EVENTS: string[];
7
6
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/features/metrics/constants.js"],"names":[],"mappings":"AAGA,kCAAiD;AACjD,yCAAyC;AACzC,iCAAiC;AACjC,yEAAyE;AACzE,wDAAwD;AAExD,mDAA2F"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/features/metrics/constants.js"],"names":[],"mappings":"AAGA,kCAAiD;AACjD,yCAAyC;AACzC,iCAAiC;AACjC,yEAAyE;AACzE,wDAAwD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newrelic/browser-agent",
3
- "version": "1.265.0",
3
+ "version": "1.265.1",
4
4
  "private": false,
5
5
  "author": "New Relic Browser Agent Team <browser-agent@newrelic.com>",
6
6
  "description": "New Relic Browser Agent",
@@ -2,7 +2,7 @@ import { getConfiguration } from '../../../common/config/init'
2
2
  import { getRuntime } from '../../../common/config/runtime'
3
3
  import { registerHandler } from '../../../common/event-emitter/register-handler'
4
4
  import { HarvestScheduler } from '../../../common/harvest/harvest-scheduler'
5
- import { FEATURE_NAME, SUPPORTABILITY_METRIC, CUSTOM_METRIC, SUPPORTABILITY_METRIC_CHANNEL, CUSTOM_METRIC_CHANNEL, WATCHABLE_WEB_SOCKET_EVENTS } from '../constants'
5
+ import { FEATURE_NAME, SUPPORTABILITY_METRIC, CUSTOM_METRIC, SUPPORTABILITY_METRIC_CHANNEL, CUSTOM_METRIC_CHANNEL/*, WATCHABLE_WEB_SOCKET_EVENTS */ } from '../constants'
6
6
  import { getFrameworks } from './framework-detection'
7
7
  import { isFileProtocol } from '../../../common/url/protocol'
8
8
  import { onDOMContentLoaded } from '../../../common/window/load'
@@ -10,8 +10,8 @@ import { windowAddEventListener } from '../../../common/event-listener/event-lis
10
10
  import { isBrowserScope, isWorkerScope } from '../../../common/constants/runtime'
11
11
  import { AggregateBase } from '../../utils/aggregate-base'
12
12
  import { deregisterDrain } from '../../../common/drain/drain'
13
- import { WEBSOCKET_TAG } from '../../../common/wrap/wrap-websocket'
14
- import { handleWebsocketEvents } from './websocket-detection'
13
+ // import { WEBSOCKET_TAG } from '../../../common/wrap/wrap-websocket'
14
+ // import { handleWebsocketEvents } from './websocket-detection'
15
15
 
16
16
  export class Aggregate extends AggregateBase {
17
17
  static featureName = FEATURE_NAME
@@ -118,11 +118,11 @@ export class Aggregate extends AggregateBase {
118
118
  mo.observe(window.document.body, { childList: true, subtree: true })
119
119
  }
120
120
 
121
- WATCHABLE_WEB_SOCKET_EVENTS.forEach(tag => {
122
- registerHandler('buffered-' + WEBSOCKET_TAG + tag, (...args) => {
123
- handleWebsocketEvents(this.storeSupportabilityMetrics.bind(this), tag, ...args)
124
- }, this.featureName, this.ee)
125
- })
121
+ // WATCHABLE_WEB_SOCKET_EVENTS.forEach(tag => {
122
+ // registerHandler('buffered-' + WEBSOCKET_TAG + tag, (...args) => {
123
+ // handleWebsocketEvents(this.storeSupportabilityMetrics.bind(this), tag, ...args)
124
+ // }, this.featureName, this.ee)
125
+ // })
126
126
  }
127
127
 
128
128
  eachSessionChecks () {
@@ -1,4 +1,4 @@
1
- import { ADD_EVENT_LISTENER_TAG } from '../../common/wrap/wrap-websocket'
1
+ // import { ADD_EVENT_LISTENER_TAG } from '../../common/wrap/wrap-websocket'
2
2
  import { FEATURE_NAMES } from '../../loaders/features/features'
3
3
 
4
4
  export const FEATURE_NAME = FEATURE_NAMES.metrics
@@ -7,4 +7,4 @@ export const CUSTOM_METRIC = 'cm'
7
7
  export const SUPPORTABILITY_METRIC_CHANNEL = 'storeSupportabilityMetrics'
8
8
  export const CUSTOM_METRIC_CHANNEL = 'storeEventMetrics'
9
9
 
10
- export const WATCHABLE_WEB_SOCKET_EVENTS = ['new', 'send', 'close', ADD_EVENT_LISTENER_TAG]
10
+ // export const WATCHABLE_WEB_SOCKET_EVENTS = ['new', 'send', 'close', ADD_EVENT_LISTENER_TAG]
@@ -1,19 +1,19 @@
1
- import { handle } from '../../../common/event-emitter/handle'
2
- import { WEBSOCKET_TAG, wrapWebSocket } from '../../../common/wrap/wrap-websocket'
1
+ // import { handle } from '../../../common/event-emitter/handle'
2
+ // import { WEBSOCKET_TAG, wrapWebSocket } from '../../../common/wrap/wrap-websocket'
3
3
  import { InstrumentBase } from '../../utils/instrument-base'
4
- import { FEATURE_NAME, WATCHABLE_WEB_SOCKET_EVENTS } from '../constants'
4
+ import { FEATURE_NAME/*, WATCHABLE_WEB_SOCKET_EVENTS */ } from '../constants'
5
5
 
6
6
  export class Instrument extends InstrumentBase {
7
7
  static featureName = FEATURE_NAME
8
8
  constructor (agentIdentifier, aggregator, auto = true) {
9
9
  super(agentIdentifier, aggregator, FEATURE_NAME, auto)
10
- wrapWebSocket(this.ee)
10
+ // wrapWebSocket(this.ee)
11
11
 
12
- WATCHABLE_WEB_SOCKET_EVENTS.forEach((suffix) => {
13
- this.ee.on(WEBSOCKET_TAG + suffix, (...args) => {
14
- handle('buffered-' + WEBSOCKET_TAG + suffix, [...args], undefined, this.featureName, this.ee)
15
- })
16
- })
12
+ // WATCHABLE_WEB_SOCKET_EVENTS.forEach((suffix) => {
13
+ // this.ee.on(WEBSOCKET_TAG + suffix, (...args) => {
14
+ // handle('buffered-' + WEBSOCKET_TAG + suffix, [...args], undefined, this.featureName, this.ee)
15
+ // })
16
+ // })
17
17
 
18
18
  this.importAggregator()
19
19
  }