@newrelic/browser-agent 1.304.0-rc.4 → 1.304.0-rc.5

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.
@@ -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.304.0-rc.4";
20
+ const VERSION = exports.VERSION = "1.304.0-rc.5";
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.304.0-rc.4";
20
+ const VERSION = exports.VERSION = "1.304.0-rc.5";
21
21
 
22
22
  /**
23
23
  * Exposes the build type of the agent
@@ -28,7 +28,7 @@ function hasValidValue(val) {
28
28
  *
29
29
  * @param {Object} [target] the registered target
30
30
  * @param {AggregateInstance} [aggregateInstance] the aggregate instance calling the method
31
- * @returns {{'mfe.id': *, 'mfe.name': String}|{}} returns an empty object if args are not supplied or the aggregate instance is not supporting version 2
31
+ * @returns {Object} returns an empty object if args are not supplied or the aggregate instance is not supporting version 2
32
32
  */
33
33
  function getVersion2Attributes(target, aggregateInstance) {
34
34
  if (aggregateInstance?.harvestEndpointVersion !== 2) return {};
@@ -40,9 +40,9 @@ function getVersion2Attributes(target, aggregateInstance) {
40
40
  };
41
41
  }
42
42
  return {
43
- 'mfe.id': target.id,
44
- 'mfe.name': target.name,
45
- eventSource: target.eventSource,
43
+ 'source.id': target.id,
44
+ 'source.name': target.name,
45
+ 'source.type': target.type,
46
46
  'parent.id': target.parent?.id || containerAgentEntityGuid
47
47
  };
48
48
  }
@@ -50,7 +50,7 @@ function register(agentRef, target, parent) {
50
50
  const attrs = {};
51
51
  (0, _console.warn)(54, 'newrelic.register');
52
52
  target ||= {};
53
- target.eventSource = 'MicroFrontendBrowserAgent';
53
+ target.type = 'MFE';
54
54
  target.licenseKey ||= agentRef.info.licenseKey; // will inherit the license key from the container agent if not provided for brevity. A future state may dictate that we need different license keys to do different things.
55
55
  target.blocked = false;
56
56
  target.parent = parent || {};
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * Exposes the version of the agent
13
13
  */
14
- export const VERSION = "1.304.0-rc.4";
14
+ export const VERSION = "1.304.0-rc.5";
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.304.0-rc.4";
14
+ export const VERSION = "1.304.0-rc.5";
15
15
 
16
16
  /**
17
17
  * Exposes the build type of the agent
@@ -20,7 +20,7 @@ export function hasValidValue(val) {
20
20
  *
21
21
  * @param {Object} [target] the registered target
22
22
  * @param {AggregateInstance} [aggregateInstance] the aggregate instance calling the method
23
- * @returns {{'mfe.id': *, 'mfe.name': String}|{}} returns an empty object if args are not supplied or the aggregate instance is not supporting version 2
23
+ * @returns {Object} returns an empty object if args are not supplied or the aggregate instance is not supporting version 2
24
24
  */
25
25
  export function getVersion2Attributes(target, aggregateInstance) {
26
26
  if (aggregateInstance?.harvestEndpointVersion !== 2) return {};
@@ -32,9 +32,9 @@ export function getVersion2Attributes(target, aggregateInstance) {
32
32
  };
33
33
  }
34
34
  return {
35
- 'mfe.id': target.id,
36
- 'mfe.name': target.name,
37
- eventSource: target.eventSource,
35
+ 'source.id': target.id,
36
+ 'source.name': target.name,
37
+ 'source.type': target.type,
38
38
  'parent.id': target.parent?.id || containerAgentEntityGuid
39
39
  };
40
40
  }
@@ -44,7 +44,7 @@ function register(agentRef, target, parent) {
44
44
  const attrs = {};
45
45
  warn(54, 'newrelic.register');
46
46
  target ||= {};
47
- target.eventSource = 'MicroFrontendBrowserAgent';
47
+ target.type = 'MFE';
48
48
  target.licenseKey ||= agentRef.info.licenseKey; // will inherit the license key from the container agent if not provided for brevity. A future state may dictate that we need different license keys to do different things.
49
49
  target.blocked = false;
50
50
  target.parent = parent || {};
@@ -14,10 +14,7 @@ export function hasValidValue(val: any): boolean;
14
14
  *
15
15
  * @param {Object} [target] the registered target
16
16
  * @param {AggregateInstance} [aggregateInstance] the aggregate instance calling the method
17
- * @returns {{'mfe.id': *, 'mfe.name': String}|{}} returns an empty object if args are not supplied or the aggregate instance is not supporting version 2
17
+ * @returns {Object} returns an empty object if args are not supplied or the aggregate instance is not supporting version 2
18
18
  */
19
- export function getVersion2Attributes(target?: Object, aggregateInstance?: AggregateInstance): {
20
- "mfe.id": any;
21
- "mfe.name": string;
22
- } | {};
19
+ export function getVersion2Attributes(target?: Object, aggregateInstance?: AggregateInstance): Object;
23
20
  //# sourceMappingURL=mfe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mfe.d.ts","sourceRoot":"","sources":["../../../../src/common/util/mfe.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,0CAHW,MAAM,GACJ,OAAO,CAInB;AAED,iDAEC;AAED;;;;;;;GAOG;AACH,+CAJW,MAAM,sBACN,iBAAiB,GACf;IAAC,QAAQ,EAAE,GAAC,CAAC;IAAC,UAAU,SAAQ;CAAC,GAAC,EAAE,CAiBhD"}
1
+ {"version":3,"file":"mfe.d.ts","sourceRoot":"","sources":["../../../../src/common/util/mfe.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,0CAHW,MAAM,GACJ,OAAO,CAInB;AAED,iDAEC;AAED;;;;;;;GAOG;AACH,+CAJW,MAAM,sBACN,iBAAiB,GACf,MAAM,CAiBlB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newrelic/browser-agent",
3
- "version": "1.304.0-rc.4",
3
+ "version": "1.304.0-rc.5",
4
4
  "private": false,
5
5
  "author": "New Relic Browser Agent Team <browser-agent@newrelic.com>",
6
6
  "description": "New Relic Browser Agent",
@@ -21,7 +21,7 @@ export function hasValidValue (val) {
21
21
  *
22
22
  * @param {Object} [target] the registered target
23
23
  * @param {AggregateInstance} [aggregateInstance] the aggregate instance calling the method
24
- * @returns {{'mfe.id': *, 'mfe.name': String}|{}} returns an empty object if args are not supplied or the aggregate instance is not supporting version 2
24
+ * @returns {Object} returns an empty object if args are not supplied or the aggregate instance is not supporting version 2
25
25
  */
26
26
  export function getVersion2Attributes (target, aggregateInstance) {
27
27
  if (aggregateInstance?.harvestEndpointVersion !== 2) return {}
@@ -33,9 +33,9 @@ export function getVersion2Attributes (target, aggregateInstance) {
33
33
  }
34
34
  }
35
35
  return {
36
- 'mfe.id': target.id,
37
- 'mfe.name': target.name,
38
- eventSource: target.eventSource,
36
+ 'source.id': target.id,
37
+ 'source.name': target.name,
38
+ 'source.type': target.type,
39
39
  'parent.id': target.parent?.id || containerAgentEntityGuid
40
40
  }
41
41
  }
@@ -45,7 +45,7 @@ function register (agentRef, target, parent) {
45
45
  warn(54, 'newrelic.register')
46
46
 
47
47
  target ||= {}
48
- target.eventSource = 'MicroFrontendBrowserAgent'
48
+ target.type = 'MFE'
49
49
  target.licenseKey ||= agentRef.info.licenseKey // will inherit the license key from the container agent if not provided for brevity. A future state may dictate that we need different license keys to do different things.
50
50
  target.blocked = false
51
51
  target.parent = parent || {}