@newrelic/browser-agent 1.317.0-rc.0 → 1.317.0-rc.2
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/dist/cjs/common/config/init-types.js +2 -0
- package/dist/cjs/common/config/init.js +3 -0
- package/dist/cjs/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/features/generic_events/aggregate/index.js +1 -1
- package/dist/cjs/features/generic_events/instrument/index.js +1 -1
- package/dist/esm/common/config/init-types.js +2 -0
- package/dist/esm/common/config/init.js +3 -0
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/features/generic_events/aggregate/index.js +1 -1
- package/dist/esm/features/generic_events/instrument/index.js +1 -1
- package/dist/types/common/config/init-types.d.ts +6 -0
- package/dist/types/common/config/init.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/common/config/init-types.js +2 -0
- package/src/common/config/init.js +2 -1
- package/src/features/generic_events/aggregate/index.js +1 -1
- package/src/features/generic_events/instrument/index.js +1 -1
|
@@ -93,5 +93,7 @@ exports.default = void 0;
|
|
|
93
93
|
* @property {Object} [user_actions]
|
|
94
94
|
* @property {boolean} [user_actions.enabled] - Must be true to allow UserAction events to be captured.
|
|
95
95
|
* @property {Array<string>} [user_actions.elementAttributes] - List of HTML Element properties to be captured with UserAction events' target elements. This may help to identify the source element being interacted with in the UI.
|
|
96
|
+
* @property {Object} [web_sockets]
|
|
97
|
+
* @property {boolean} [web_sockets.enabled] - Turn on/off the web sockets feature (off by default).
|
|
96
98
|
*/
|
|
97
99
|
var _default = exports.default = {};
|
|
@@ -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.317.0-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.317.0-rc.2";
|
|
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.317.0-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.317.0-rc.2";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Exposes the build type of the agent
|
|
@@ -261,7 +261,7 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
261
261
|
};
|
|
262
262
|
this.addEvent(event, target);
|
|
263
263
|
}, this.featureName, this.ee);
|
|
264
|
-
if (agentRef.init.feature_flags.includes('websockets')) {
|
|
264
|
+
if (agentRef.init.feature_flags.includes('websockets') || agentRef.init.web_sockets?.enabled) {
|
|
265
265
|
(0, _registerHandler.registerHandler)('ws-complete', nrData => {
|
|
266
266
|
const event = {
|
|
267
267
|
...nrData,
|
|
@@ -30,7 +30,7 @@ class Instrument extends _instrumentBase.InstrumentBase {
|
|
|
30
30
|
static featureName = _constants.FEATURE_NAME;
|
|
31
31
|
constructor(agentRef) {
|
|
32
32
|
super(agentRef, _constants.FEATURE_NAME);
|
|
33
|
-
const websocketsEnabled = agentRef.init.feature_flags.includes('websockets');
|
|
33
|
+
const websocketsEnabled = agentRef.init.feature_flags.includes('websockets') || agentRef.init.web_sockets?.enabled;
|
|
34
34
|
const securityPolicyViolationEnabled = !agentRef.init.feature_flags.includes('no_spv');
|
|
35
35
|
|
|
36
36
|
/** config values that gate whether the generic events aggregator should be imported at all */
|
|
@@ -88,6 +88,8 @@
|
|
|
88
88
|
* @property {Object} [user_actions]
|
|
89
89
|
* @property {boolean} [user_actions.enabled] - Must be true to allow UserAction events to be captured.
|
|
90
90
|
* @property {Array<string>} [user_actions.elementAttributes] - List of HTML Element properties to be captured with UserAction events' target elements. This may help to identify the source element being interacted with in the UI.
|
|
91
|
+
* @property {Object} [web_sockets]
|
|
92
|
+
* @property {boolean} [web_sockets.enabled] - Turn on/off the web sockets feature (off by default).
|
|
91
93
|
*/
|
|
92
94
|
|
|
93
95
|
export default {};
|
|
@@ -254,7 +254,7 @@ export class Aggregate extends AggregateBase {
|
|
|
254
254
|
};
|
|
255
255
|
this.addEvent(event, target);
|
|
256
256
|
}, this.featureName, this.ee);
|
|
257
|
-
if (agentRef.init.feature_flags.includes('websockets')) {
|
|
257
|
+
if (agentRef.init.feature_flags.includes('websockets') || agentRef.init.web_sockets?.enabled) {
|
|
258
258
|
registerHandler('ws-complete', nrData => {
|
|
259
259
|
const event = {
|
|
260
260
|
...nrData,
|
|
@@ -25,7 +25,7 @@ export class Instrument extends InstrumentBase {
|
|
|
25
25
|
static featureName = FEATURE_NAME;
|
|
26
26
|
constructor(agentRef) {
|
|
27
27
|
super(agentRef, FEATURE_NAME);
|
|
28
|
-
const websocketsEnabled = agentRef.init.feature_flags.includes('websockets');
|
|
28
|
+
const websocketsEnabled = agentRef.init.feature_flags.includes('websockets') || agentRef.init.web_sockets?.enabled;
|
|
29
29
|
const securityPolicyViolationEnabled = !agentRef.init.feature_flags.includes('no_spv');
|
|
30
30
|
|
|
31
31
|
/** config values that gate whether the generic events aggregator should be imported at all */
|
|
@@ -276,5 +276,11 @@ export type Init = {
|
|
|
276
276
|
*/
|
|
277
277
|
elementAttributes?: string[] | undefined;
|
|
278
278
|
} | undefined;
|
|
279
|
+
web_sockets?: {
|
|
280
|
+
/**
|
|
281
|
+
* - Turn on/off the web sockets feature (off by default).
|
|
282
|
+
*/
|
|
283
|
+
enabled?: boolean | undefined;
|
|
284
|
+
} | undefined;
|
|
279
285
|
};
|
|
280
286
|
//# sourceMappingURL=init-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init.js"],"names":[],"mappings":"AAiJO,0CAEN;mBAvIY,OAAO,cAAc,EAAE,IAAI"}
|
package/package.json
CHANGED
|
@@ -88,6 +88,8 @@
|
|
|
88
88
|
* @property {Object} [user_actions]
|
|
89
89
|
* @property {boolean} [user_actions.enabled] - Must be true to allow UserAction events to be captured.
|
|
90
90
|
* @property {Array<string>} [user_actions.elementAttributes] - List of HTML Element properties to be captured with UserAction events' target elements. This may help to identify the source element being interacted with in the UI.
|
|
91
|
+
* @property {Object} [web_sockets]
|
|
92
|
+
* @property {boolean} [web_sockets.enabled] - Turn on/off the web sockets feature (off by default).
|
|
91
93
|
*/
|
|
92
94
|
|
|
93
95
|
export default {}
|
|
@@ -138,7 +138,8 @@ const InitModelFn = () => {
|
|
|
138
138
|
session_trace: { enabled: true, autoStart: true },
|
|
139
139
|
soft_navigations: { enabled: true, autoStart: true },
|
|
140
140
|
ssl: undefined,
|
|
141
|
-
user_actions: { enabled: true, elementAttributes: ['id', 'className', 'tagName', 'type'] }
|
|
141
|
+
user_actions: { enabled: true, elementAttributes: ['id', 'className', 'tagName', 'type'] },
|
|
142
|
+
web_sockets: { enabled: false }
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
145
|
|
|
@@ -251,7 +251,7 @@ export class Aggregate extends AggregateBase {
|
|
|
251
251
|
this.addEvent(event, target)
|
|
252
252
|
}, this.featureName, this.ee)
|
|
253
253
|
|
|
254
|
-
if (agentRef.init.feature_flags.includes('websockets')) {
|
|
254
|
+
if (agentRef.init.feature_flags.includes('websockets') || agentRef.init.web_sockets?.enabled) {
|
|
255
255
|
registerHandler('ws-complete', (nrData) => {
|
|
256
256
|
const event = {
|
|
257
257
|
...nrData,
|
|
@@ -26,7 +26,7 @@ export class Instrument extends InstrumentBase {
|
|
|
26
26
|
static featureName = FEATURE_NAME
|
|
27
27
|
constructor (agentRef) {
|
|
28
28
|
super(agentRef, FEATURE_NAME)
|
|
29
|
-
const websocketsEnabled = agentRef.init.feature_flags.includes('websockets')
|
|
29
|
+
const websocketsEnabled = agentRef.init.feature_flags.includes('websockets') || agentRef.init.web_sockets?.enabled
|
|
30
30
|
const securityPolicyViolationEnabled = !agentRef.init.feature_flags.includes('no_spv')
|
|
31
31
|
|
|
32
32
|
/** config values that gate whether the generic events aggregator should be imported at all */
|