@newrelic/browser-agent 1.311.0 → 1.312.0

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.
Files changed (81) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/common/constants/agent-constants.js +4 -5
  3. package/dist/cjs/common/constants/env.cdn.js +2 -2
  4. package/dist/cjs/common/constants/env.npm.js +2 -2
  5. package/dist/cjs/common/util/script-tracker.js +2 -0
  6. package/dist/cjs/common/util/stringify.js +6 -21
  7. package/dist/cjs/common/util/v2.js +90 -6
  8. package/dist/cjs/common/wrap/wrap-fetch.js +10 -5
  9. package/dist/cjs/common/wrap/wrap-function.js +17 -9
  10. package/dist/cjs/common/wrap/wrap-logger.js +6 -4
  11. package/dist/cjs/common/wrap/wrap-xhr.js +3 -1
  12. package/dist/cjs/features/ajax/aggregate/index.js +24 -6
  13. package/dist/cjs/features/ajax/instrument/index.js +12 -10
  14. package/dist/cjs/features/generic_events/instrument/index.js +3 -3
  15. package/dist/cjs/features/logging/aggregate/index.js +12 -7
  16. package/dist/cjs/features/logging/instrument/index.js +6 -4
  17. package/dist/cjs/features/logging/shared/utils.js +4 -4
  18. package/dist/cjs/features/soft_navigations/aggregate/ajax-node.js +6 -3
  19. package/dist/cjs/loaders/api/register.js +24 -23
  20. package/dist/cjs/loaders/api/wrapLogger.js +2 -2
  21. package/dist/esm/common/constants/agent-constants.js +4 -5
  22. package/dist/esm/common/constants/env.cdn.js +2 -2
  23. package/dist/esm/common/constants/env.npm.js +2 -2
  24. package/dist/esm/common/util/script-tracker.js +2 -2
  25. package/dist/esm/common/util/stringify.js +6 -21
  26. package/dist/esm/common/util/v2.js +86 -6
  27. package/dist/esm/common/wrap/wrap-fetch.js +10 -5
  28. package/dist/esm/common/wrap/wrap-function.js +17 -9
  29. package/dist/esm/common/wrap/wrap-logger.js +6 -4
  30. package/dist/esm/common/wrap/wrap-xhr.js +3 -1
  31. package/dist/esm/features/ajax/aggregate/index.js +24 -6
  32. package/dist/esm/features/ajax/instrument/index.js +12 -10
  33. package/dist/esm/features/generic_events/instrument/index.js +3 -3
  34. package/dist/esm/features/logging/aggregate/index.js +13 -8
  35. package/dist/esm/features/logging/instrument/index.js +6 -4
  36. package/dist/esm/features/logging/shared/utils.js +4 -4
  37. package/dist/esm/features/soft_navigations/aggregate/ajax-node.js +6 -3
  38. package/dist/esm/loaders/api/register.js +24 -23
  39. package/dist/esm/loaders/api/wrapLogger.js +2 -2
  40. package/dist/types/common/constants/agent-constants.d.ts.map +1 -1
  41. package/dist/types/common/util/script-tracker.d.ts +11 -0
  42. package/dist/types/common/util/script-tracker.d.ts.map +1 -1
  43. package/dist/types/common/util/stringify.d.ts.map +1 -1
  44. package/dist/types/common/util/v2.d.ts +37 -0
  45. package/dist/types/common/util/v2.d.ts.map +1 -1
  46. package/dist/types/common/wrap/wrap-fetch.d.ts +1 -1
  47. package/dist/types/common/wrap/wrap-fetch.d.ts.map +1 -1
  48. package/dist/types/common/wrap/wrap-function.d.ts +1 -1
  49. package/dist/types/common/wrap/wrap-function.d.ts.map +1 -1
  50. package/dist/types/common/wrap/wrap-logger.d.ts +1 -1
  51. package/dist/types/common/wrap/wrap-logger.d.ts.map +1 -1
  52. package/dist/types/common/wrap/wrap-xhr.d.ts +1 -1
  53. package/dist/types/common/wrap/wrap-xhr.d.ts.map +1 -1
  54. package/dist/types/features/ajax/aggregate/index.d.ts +2 -1
  55. package/dist/types/features/ajax/aggregate/index.d.ts.map +1 -1
  56. package/dist/types/features/ajax/instrument/index.d.ts.map +1 -1
  57. package/dist/types/features/logging/aggregate/index.d.ts.map +1 -1
  58. package/dist/types/features/logging/instrument/index.d.ts.map +1 -1
  59. package/dist/types/features/logging/shared/utils.d.ts +2 -2
  60. package/dist/types/features/logging/shared/utils.d.ts.map +1 -1
  61. package/dist/types/features/soft_navigations/aggregate/ajax-node.d.ts +1 -0
  62. package/dist/types/features/soft_navigations/aggregate/ajax-node.d.ts.map +1 -1
  63. package/dist/types/loaders/api/register.d.ts.map +1 -1
  64. package/package.json +2 -2
  65. package/src/common/constants/agent-constants.js +4 -5
  66. package/src/common/util/script-tracker.js +2 -2
  67. package/src/common/util/stringify.js +6 -23
  68. package/src/common/util/v2.js +84 -7
  69. package/src/common/wrap/wrap-fetch.js +12 -5
  70. package/src/common/wrap/wrap-function.js +16 -9
  71. package/src/common/wrap/wrap-logger.js +6 -4
  72. package/src/common/wrap/wrap-xhr.js +3 -1
  73. package/src/features/ajax/aggregate/index.js +22 -6
  74. package/src/features/ajax/instrument/index.js +13 -10
  75. package/src/features/generic_events/instrument/index.js +3 -3
  76. package/src/features/logging/aggregate/index.js +13 -14
  77. package/src/features/logging/instrument/index.js +6 -4
  78. package/src/features/logging/shared/utils.js +4 -4
  79. package/src/features/soft_navigations/aggregate/ajax-node.js +6 -3
  80. package/src/loaders/api/register.js +19 -12
  81. package/src/loaders/api/wrapLogger.js +2 -2
@@ -12,6 +12,7 @@ import { AggregateBase } from '../../utils/aggregate-base';
12
12
  import { parseGQL } from './gql';
13
13
  import { nullable, numeric, getAddStringContext, addCustomAttributes } from '../../../common/serialize/bel-serializer';
14
14
  import { gosNREUMOriginals } from '../../../common/window/nreum';
15
+ import { getVersion2Attributes, getVersion2DuplicationAttributes, shouldDuplicate } from '../../../common/util/v2';
15
16
  export class Aggregate extends AggregateBase {
16
17
  static featureName = FEATURE_NAME;
17
18
  constructor(agentRef) {
@@ -25,9 +26,9 @@ export class Aggregate extends AggregateBase {
25
26
  super.customAttributesAreSeparate = true;
26
27
  }
27
28
  registerHandler('returnAjax', event => this.events.add(event), this.featureName, this.ee);
28
- registerHandler('xhr', function () {
29
+ registerHandler('xhr', function (params, metrics, startTime, endTime, type, target) {
29
30
  // the EE-drain system not only switches "this" but also passes a new EventContext with info. Should consider platform refactor to another system which passes a mutable context around separately and predictably to avoid problems like this.
30
- classThis.storeXhr(...arguments, this); // this switches the context back to the class instance while passing the NR context as an argument -- see "ctx" in storeXhr
31
+ classThis.storeXhr(params, metrics, startTime, endTime, type, target, this); // this switches the context back to the class instance while passing the NR context as an argument -- see "ctx" in storeXhr
31
32
  }, this.featureName, this.ee);
32
33
  this.ee.on('long-task', (task, originator) => {
33
34
  if (originator instanceof gosNREUMOriginals().o.XHR) {
@@ -38,7 +39,7 @@ export class Aggregate extends AggregateBase {
38
39
  });
39
40
  this.waitForFlags([]).then(() => this.drain());
40
41
  }
41
- storeXhr(params, metrics, startTime, endTime, type, ctx) {
42
+ storeXhr(params, metrics, startTime, endTime, type, target, ctx) {
42
43
  metrics.time = startTime;
43
44
 
44
45
  // send to session traces
@@ -93,12 +94,28 @@ export class Aggregate extends AggregateBase {
93
94
  query: ctx.parsedOrigin?.search
94
95
  });
95
96
  if (event.gql) this.reportSupportabilityMetric('Ajax/Events/GraphQL/Bytes-Added', stringify(event.gql).length);
97
+
98
+ /** make a copy of the event for the MFE target if it exists */
99
+ if (target) {
100
+ this.events.add({
101
+ ...event,
102
+ targetAttributes: getVersion2Attributes(target, this)
103
+ });
104
+ if (shouldDuplicate(target, this)) this.reportContainerEvent({
105
+ ...event,
106
+ targetAttributes: getVersion2DuplicationAttributes(target, this)
107
+ }, ctx);
108
+ } else {
109
+ this.reportContainerEvent(event, ctx);
110
+ }
111
+ }
112
+ reportContainerEvent(evt, ctx) {
96
113
  const softNavInUse = Boolean(this.agentRef.features?.[FEATURE_NAMES.softNav]);
97
114
  if (softNavInUse) {
98
115
  // when SN is running, pass the event w/ info to it for evaluation -- either part of an interaction or is given back
99
- handle('ajax', [event, ctx], undefined, FEATURE_NAMES.softNav, this.ee);
116
+ handle('ajax', [evt, ctx], undefined, FEATURE_NAMES.softNav, this.ee);
100
117
  } else {
101
- this.events.add(event);
118
+ this.events.add(evt);
102
119
  }
103
120
  }
104
121
  serializer(eventBuffer) {
@@ -132,7 +149,8 @@ export class Aggregate extends AggregateBase {
132
149
  // gql decorators are added as custom attributes to alleviate need for new BEL schema
133
150
  const attrParts = addCustomAttributes({
134
151
  ...(jsAttributes || {}),
135
- ...(event.gql || {})
152
+ ...(event.gql || {}),
153
+ ...(event.targetAttributes || {}) // used to supply the version 2 attributes, either MFE target or duplication attributes for the main agent app
136
154
  }, addString);
137
155
  fields.unshift(numeric(attrParts.length));
138
156
  insert += fields.join(',');
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2020-2025 New Relic, Inc. All rights reserved.
2
+ * Copyright 2020-2026 New Relic, Inc. All rights reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { gosNREUMOriginals } from '../../../common/window/nreum';
@@ -63,8 +63,8 @@ export class Instrument extends InstrumentBase {
63
63
  } catch (err) {
64
64
  // do nothing
65
65
  }
66
- wrapFetch(this.ee);
67
- wrapXhr(this.ee);
66
+ wrapFetch(this.ee, agentRef);
67
+ wrapXhr(this.ee, agentRef);
68
68
  subscribeToEvents(agentRef, this.ee, this.handler, this.dt);
69
69
  this.importAggregator(agentRef, () => import(/* webpackChunkName: "ajax-aggregate" */'../aggregate/index.js'));
70
70
  }
@@ -287,12 +287,9 @@ function subscribeToEvents(agentRef, ee, handler, dt) {
287
287
  this.metrics = {};
288
288
  this.startTime = now();
289
289
  this.dt = dtPayload;
290
- if (fetchArguments.length >= 1) this.target = fetchArguments[0];
291
- if (fetchArguments.length >= 2) this.opts = fetchArguments[1];
292
- var opts = this.opts || {};
293
- var target = this.target;
290
+ let [target, opts = {}] = fetchArguments;
294
291
  addUrl(this, extractUrl(target));
295
- var method = ('' + (target && target instanceof origRequest && target.method || opts.method || 'GET')).toUpperCase();
292
+ const method = ('' + (target && target instanceof origRequest && target.method || opts.method || 'GET')).toUpperCase();
296
293
  this.params.method = method;
297
294
  this.body = opts.body;
298
295
  this.txSize = dataSize(opts.body) || 0;
@@ -317,7 +314,8 @@ function subscribeToEvents(agentRef, ee, handler, dt) {
317
314
  rxSize: responseSize,
318
315
  duration: now() - this.startTime
319
316
  };
320
- handler('xhr', [this.params, metrics, this.startTime, this.endTime, 'fetch'], this, FEATURE_NAMES.ajax);
317
+ const payload = [this.params, metrics, this.startTime, this.endTime, 'fetch'];
318
+ this.targets.forEach(target => reportToAgg(payload, this, target));
321
319
  }
322
320
 
323
321
  // Create report for XHR request that has finished
@@ -341,7 +339,11 @@ function subscribeToEvents(agentRef, ee, handler, dt) {
341
339
 
342
340
  // Always send cbTime, even if no noticeable time was taken.
343
341
  metrics.cbTime = this.cbTime;
344
- handler('xhr', [params, metrics, this.startTime, this.endTime, 'xhr'], this, FEATURE_NAMES.ajax);
342
+ const payload = [params, metrics, this.startTime, this.endTime, 'xhr'];
343
+ this.targets.forEach(target => reportToAgg(payload, this, target));
344
+ }
345
+ function reportToAgg(payload, context, target) {
346
+ handler('xhr', [...payload, target], context, FEATURE_NAMES.ajax);
345
347
  }
346
348
  function captureXhrData(ctx, xhr) {
347
349
  ctx.params.status = xhr.status;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2020-2025 New Relic, Inc. All rights reserved.
2
+ * Copyright 2020-2026 New Relic, Inc. All rights reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
 
@@ -39,8 +39,8 @@ export class Instrument extends InstrumentBase {
39
39
  let historyEE, websocketsEE;
40
40
  if (websocketsEnabled) websocketsEE = wrapWebSocket(this.ee);
41
41
  if (isBrowserScope) {
42
- wrapFetch(this.ee);
43
- wrapXhr(this.ee);
42
+ wrapFetch(this.ee, agentRef);
43
+ wrapXhr(this.ee, agentRef);
44
44
  historyEE = wrapHistory(this.ee);
45
45
  if (agentRef.init.user_actions.enabled) {
46
46
  OBSERVED_EVENTS.forEach(eventType => windowAddEventListener(eventType, evt => handle('ua', [evt], undefined, this.featureName, this.ee), true));
@@ -13,7 +13,7 @@ import { applyFnToProps } from '../../../common/util/traverse';
13
13
  import { SESSION_EVENT_TYPES, SESSION_EVENTS } from '../../../common/session/constants';
14
14
  import { ABORT_REASONS } from '../../session_replay/constants';
15
15
  import { canEnableSessionTracking } from '../../utils/feature-gates';
16
- import { getVersion2Attributes } from '../../../common/util/v2';
16
+ import { getVersion2Attributes, getVersion2DuplicationAttributes, shouldDuplicate } from '../../../common/util/v2';
17
17
  const LOGGING_EVENT = 'Logging/Event/';
18
18
  export class Aggregate extends AggregateBase {
19
19
  static featureName = FEATURE_NAME;
@@ -71,11 +71,6 @@ export class Aggregate extends AggregateBase {
71
71
  const modeForThisLog = autoCaptured ? this.loggingMode.auto : this.loggingMode.api;
72
72
  if (!modeForThisLog) return;
73
73
  if (!attributes || typeof attributes !== 'object') attributes = {};
74
- attributes = {
75
- ...attributes,
76
- /** Specific attributes only supplied if harvesting to endpoint version 2 */
77
- ...getVersion2Attributes(target, this)
78
- };
79
74
  if (typeof level === 'string') level = level.toUpperCase();
80
75
  if (!isValidLogLevel(level)) return warn(30, level);
81
76
  if (modeForThisLog < (LOGGING_MODE[level] || Infinity)) {
@@ -98,8 +93,18 @@ export class Aggregate extends AggregateBase {
98
93
  return;
99
94
  }
100
95
  if (typeof message !== 'string' || !message) return warn(32);
101
- const log = new Log(Math.floor(this.agentRef.runtime.timeKeeper.correctRelativeTimestamp(timestamp)), message, attributes, level);
102
- if (this.events.add(log)) this.reportSupportabilityMetric(LOGGING_EVENT + (autoCaptured ? 'Auto' : 'API') + '/Added');
96
+ const addEvent = attributes => {
97
+ const log = new Log(Math.floor(this.agentRef.runtime.timeKeeper.correctRelativeTimestamp(timestamp)), message, attributes, level);
98
+ if (this.events.add(log)) this.reportSupportabilityMetric(LOGGING_EVENT + (autoCaptured ? 'Auto' : 'API') + '/Added');
99
+ };
100
+ addEvent({
101
+ ...attributes,
102
+ ...getVersion2Attributes(target, this)
103
+ });
104
+ if (shouldDuplicate(target, this)) addEvent({
105
+ ...attributes,
106
+ ...getVersion2DuplicationAttributes(target, this)
107
+ });
103
108
  }
104
109
  serializer(eventBuffer) {
105
110
  const sessionEntity = this.agentRef.runtime.session;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2020-2025 New Relic, Inc. All rights reserved.
2
+ * Copyright 2020-2026 New Relic, Inc. All rights reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { InstrumentBase } from '../../utils/instrument-base';
@@ -26,17 +26,19 @@ export class Instrument extends InstrumentBase {
26
26
  isNative(globalScope.console[method]);
27
27
  wrapLogger(instanceEE, globalScope.console, method, {
28
28
  level: method === 'log' ? 'info' : method
29
- });
29
+ }, undefined, agentRef);
30
30
  });
31
31
 
32
32
  /** emitted by wrap-logger function */
33
- this.ee.on('wrap-logger-end', function handleLog([message]) {
33
+ this.ee.on('wrap-logger-end', function handleLog([message], _, __, targets = []) {
34
34
  const {
35
35
  level,
36
36
  customAttributes,
37
37
  autoCaptured
38
38
  } = this;
39
- bufferLog(instanceEE, message, customAttributes, level, autoCaptured);
39
+ targets.forEach(target => {
40
+ bufferLog(instanceEE, message, customAttributes, level, autoCaptured, target);
41
+ });
40
42
  });
41
43
  this.importAggregator(agentRef, () => import(/* webpackChunkName: "logging-aggregate" */'../aggregate'));
42
44
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2020-2025 New Relic, Inc. All rights reserved.
2
+ * Copyright 2020-2026 New Relic, Inc. All rights reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { handle } from '../../../common/event-emitter/handle';
@@ -14,11 +14,11 @@ import { LOGGING_EVENT_EMITTER_CHANNEL, LOG_LEVELS } from '../constants';
14
14
  * @param {{[key: string]: *}} customAttributes - The log's custom attributes if any
15
15
  * @param {enum} level - the log level enum
16
16
  * @param {boolean} [autoCaptured=true] - True if log was captured from auto wrapping. False if it was captured from the API manual usage.
17
- * @param {object=} target - the optional target provided by an api call
17
+ * @param {object=} targets - the optional targets found
18
18
  */
19
- export function bufferLog(ee, message, customAttributes = {}, level = LOG_LEVELS.INFO, autoCaptured = true, target, timestamp = now()) {
19
+ export function bufferLog(ee, message, customAttributes = {}, level = LOG_LEVELS.INFO, autoCaptured = true, targets, timestamp = now()) {
20
20
  handle(SUPPORTABILITY_METRIC_CHANNEL, ["API/logging/".concat(level.toLowerCase(), "/called")], undefined, FEATURE_NAMES.metrics, ee);
21
- handle(LOGGING_EVENT_EMITTER_CHANNEL, [timestamp, message, customAttributes, level, autoCaptured, target], undefined, FEATURE_NAMES.logging, ee);
21
+ handle(LOGGING_EVENT_EMITTER_CHANNEL, [timestamp, message, customAttributes, level, autoCaptured, targets], undefined, FEATURE_NAMES.logging, ee);
22
22
  }
23
23
 
24
24
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2020-2025 New Relic, Inc. All rights reserved.
2
+ * Copyright 2020-2026 New Relic, Inc. All rights reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { addCustomAttributes, getAddStringContext, nullable, numeric } from '../../../common/serialize/bel-serializer';
@@ -20,6 +20,7 @@ export class AjaxNode extends BelNode {
20
20
  this.traceId = ajaxEvent.traceId;
21
21
  this.spanTimestamp = ajaxEvent.spanTimestamp;
22
22
  this.gql = ajaxEvent.gql;
23
+ this.targetAttributes = ajaxEvent.targetAttributes;
23
24
  this.start = ajaxEvent.startTime;
24
25
  this.end = ajaxEvent.endTime;
25
26
  if (ajaxContext?.latestLongtaskEnd) {
@@ -43,8 +44,10 @@ export class AjaxNode extends BelNode {
43
44
  numeric(this.callbackDuration),
44
45
  // not relative
45
46
  addString(this.method), numeric(this.status), addString(this.domain), addString(this.path), numeric(this.txSize), numeric(this.rxSize), this.requestedWith, addString(this.nodeId), nullable(this.spanId, addString, true) + nullable(this.traceId, addString, true) + nullable(this.spanTimestamp, numeric)];
46
- let allAttachedNodes = [];
47
- if (typeof this.gql === 'object') allAttachedNodes = addCustomAttributes(this.gql, addString);
47
+ let allAttachedNodes = addCustomAttributes({
48
+ ...(this.gql || {}),
49
+ ...(this.targetAttributes || {})
50
+ }, addString);
48
51
  this.children.forEach(node => allAttachedNodes.push(node.serialize())); // no children is expected under ajax nodes at this time
49
52
 
50
53
  fields[1] = numeric(allAttachedNodes.length);
@@ -18,6 +18,7 @@ import { measure } from './measure';
18
18
  import { recordCustomEvent } from './recordCustomEvent';
19
19
  import { subscribeToPageUnload } from '../../common/window/page-visibility';
20
20
  import { findScriptTimings } from '../../common/util/script-tracker';
21
+ import { generateRandomHexString } from '../../common/ids/unique-id';
21
22
 
22
23
  /**
23
24
  * @typedef {import('./register-api-types').RegisterAPI} RegisterAPI
@@ -47,13 +48,32 @@ export function setupRegisterAPI(agent) {
47
48
  function register(agentRef, target, parent) {
48
49
  warn(54, 'newrelic.register');
49
50
  target ||= {};
51
+ target.instance = generateRandomHexString(8);
50
52
  target.type = V2_TYPES.MFE;
51
53
  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.
52
54
  target.blocked = false;
53
- target.parent = parent || {};
54
55
  if (typeof target.tags !== 'object' || target.tags === null || Array.isArray(target.tags)) target.tags = {};
56
+ target.parent = parent || {
57
+ get id() {
58
+ return agentRef.runtime.appMetadata.agents[0].entityGuid;
59
+ },
60
+ // getter because this is asyncronously set
61
+ type: V2_TYPES.BA
62
+ };
55
63
  const timings = findScriptTimings();
56
64
  const attrs = {};
65
+ Object.defineProperty(target, 'attributes', {
66
+ get() {
67
+ return {
68
+ ...attrs,
69
+ 'source.id': target.id,
70
+ 'source.name': target.name,
71
+ 'source.type': target.type,
72
+ 'parent.type': target.parent?.type || V2_TYPES.BA,
73
+ 'parent.id': target.parent?.id
74
+ };
75
+ }
76
+ });
57
77
 
58
78
  // Process tags object and add to attrs, excluding protected keys
59
79
  Object.entries(target.tags).forEach(([key, value]) => {
@@ -134,7 +154,9 @@ function register(agentRef, target, parent) {
134
154
  setUserId: value => setLocalValue('enduser.id', value),
135
155
  /** metadata */
136
156
  metadata: {
137
- customAttributes: attrs,
157
+ get customAttributes() {
158
+ return attrs;
159
+ },
138
160
  target,
139
161
  timings
140
162
  }
@@ -207,27 +229,6 @@ function register(agentRef, target, parent) {
207
229
  const timestamp = now();
208
230
  handle(SUPPORTABILITY_METRIC_CHANNEL, ["API/register/".concat(methodToCall.name, "/called")], undefined, FEATURE_NAMES.metrics, agentRef.ee);
209
231
  try {
210
- const shouldDuplicate = agentRef.init.api.duplicate_registered_data && methodToCall !== register;
211
- if (shouldDuplicate) {
212
- let duplicatedArgs = args;
213
- if (args[1] instanceof Object) {
214
- const childAttrs = {
215
- 'child.id': target.id,
216
- 'child.type': target.type
217
- };
218
- if ('customAttributes' in args[1]) duplicatedArgs = [args[0], {
219
- ...args[1],
220
- customAttributes: {
221
- ...args[1].customAttributes,
222
- ...childAttrs
223
- }
224
- }, ...args.slice(2)];else duplicatedArgs = [args[0], {
225
- ...args[1],
226
- ...childAttrs
227
- }, ...args.slice(2)];
228
- }
229
- methodToCall(...duplicatedArgs, undefined, timestamp);
230
- }
231
232
  return methodToCall(...args, target, timestamp); // always report to target
232
233
  } catch (err) {
233
234
  warn(50, err);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2020-2025 New Relic, Inc. All rights reserved.
2
+ * Copyright 2020-2026 New Relic, Inc. All rights reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { wrapLogger } from '../../common/wrap/wrap-logger';
@@ -14,6 +14,6 @@ export function setupWrapLoggerAPI(agent) {
14
14
  wrapLogger(agent.ee, parent, functionName, {
15
15
  customAttributes,
16
16
  level
17
- }, false);
17
+ }, false, agent);
18
18
  }, agent);
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"agent-constants.d.ts","sourceRoot":"","sources":["../../../../src/common/constants/agent-constants.js"],"names":[],"mappings":"AAMA,iCAAkC,KAAK,CAAA;AACvC,+BAAgC,OAAO,CAAA;AACvC,0BAA2B,oBAAoB,CAAA;AAC/C,4BAA6B,eAAe,CAAA;AAE5C;IACE,CAAC,aAAa,CAAC,OAAO,CAAC,UAAM;IAE7B,CAAC,aAAa,CAAC,aAAa,CAAC,UAAO;IACpC,CAAC,aAAa,CAAC,QAAQ,CAAC,UAAO;IAC/B,CAAC,aAAa,CAAC,IAAI,CAAC,UAAO;EAC5B;8BAb6B,iCAAiC"}
1
+ {"version":3,"file":"agent-constants.d.ts","sourceRoot":"","sources":["../../../../src/common/constants/agent-constants.js"],"names":[],"mappings":"AAMA,iCAAkC,KAAK,CAAA;AACvC,+BAAgC,OAAO,CAAA;AACvC,0BAA2B,oBAAoB,CAAA;AAC/C,4BAA6B,eAAe,CAAA;AAE5C;IACE,CAAC,aAAa,CAAC,OAAO,CAAC,UAAM;IAC7B,CAAC,aAAa,CAAC,aAAa,CAAC,UAAM;IACnC,CAAC,aAAa,CAAC,QAAQ,CAAC,UAAM;IAC9B,CAAC,aAAa,CAAC,IAAI,CAAC,UAAM;EAC3B;8BAZ6B,iCAAiC"}
@@ -1,3 +1,14 @@
1
+ /**
2
+ * Extracts URLs from stack traces using the same logic as compute-stack-trace.js
3
+ * @param {string} stack The error stack trace
4
+ * @returns {string[]} Array of cleaned URLs found in the stack trace
5
+ */
6
+ export function extractUrlsFromStack(stack: string): string[];
7
+ /**
8
+ * Returns a deep stack trace by temporarily increasing the stack trace limit.
9
+ * @returns {Error.stack | undefined}
10
+ */
11
+ export function getDeepStackTrace(): Error.stack | undefined;
1
12
  /**
2
13
  * Uses the stack of the initiator function, returns script timing information if a script can be found with the resource timing API matching the URL found in the stack.
3
14
  * @returns {RegisterAPITimings} Object containing script fetch start and end times, and the asset URL if found
@@ -1 +1 @@
1
- {"version":3,"file":"script-tracker.d.ts","sourceRoot":"","sources":["../../../../src/common/util/script-tracker.js"],"names":[],"mappings":"AAmHA;;;GAGG;AACH,qCAFa,kBAAkB,CAuE9B;AAlLD;;GAEG;AAEH,kCAAkC;AAClC,yBAAmB"}
1
+ {"version":3,"file":"script-tracker.d.ts","sourceRoot":"","sources":["../../../../src/common/util/script-tracker.js"],"names":[],"mappings":"AAmDA;;;;GAIG;AACH,4CAHW,MAAM,GACJ,MAAM,EAAE,CAsBpB;AAED;;;GAGG;AACH,qCAFa,KAAK,CAAC,KAAK,GAAG,SAAS,CAanC;AAsBD;;;GAGG;AACH,qCAFa,kBAAkB,CAuE9B;AAlLD;;GAEG;AAEH,kCAAkC;AAClC,yBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"stringify.d.ts","sourceRoot":"","sources":["../../../../src/common/util/stringify.js"],"names":[],"mappings":"AA0CA;;;;;GAKG;AACH,+BAHW,GAAC,GACC,MAAM,CAclB"}
1
+ {"version":3,"file":"stringify.d.ts","sourceRoot":"","sources":["../../../../src/common/util/stringify.js"],"names":[],"mappings":"AAyBA;;;;;GAKG;AACH,+BAHW,GAAC,GACC,MAAM,CAclB"}
@@ -1,3 +1,17 @@
1
+ /**
2
+ * Returns the registered target associated with a given ID. Returns an empty array if no target is found.
3
+ * @param {string|number} id
4
+ * @param {*} agentRef the agent reference
5
+ * @returns {import("../../interfaces/registered-entity").RegisterAPIMetadataTarget[]}
6
+ */
7
+ export function getRegisteredTargetsFromId(id: string | number, agentRef: any): import("../../interfaces/registered-entity").RegisterAPIMetadataTarget[];
8
+ /**
9
+ * Returns the registered target(s) associated with a given filename if found in the resource timing API during registration. Returns an empty array if no target is found.
10
+ * @param {string} filename
11
+ * @param {*} agentRef
12
+ * @returns {import("../../interfaces/registered-entity").RegisterAPIMetadataTarget[]}
13
+ */
14
+ export function getRegisteredTargetsFromFilename(filename: string, agentRef: any): import("../../interfaces/registered-entity").RegisterAPIMetadataTarget[];
1
15
  /**
2
16
  * When given a valid target, returns an object with the V2 payload attributes. Returns an empty object otherwise.
3
17
  * @note Field names may change as the schema is finalized
@@ -7,6 +21,29 @@
7
21
  * @returns {Object} returns an empty object if args are not supplied or the aggregate instance is not supporting version 2
8
22
  */
9
23
  export function getVersion2Attributes(target?: Object, aggregateInstance?: AggregateInstance): Object;
24
+ /**
25
+ * Returns the attributes used for duplicating data in version 2 of the harvest endpoint.
26
+ * If not valid for duplication, returns an empty object.
27
+ * @note BEST PRACTICE - Caller should call shouldDuplicate() before utilizing this method to determine if duplication attributes should be added to the event.
28
+ * @param {import("../../interfaces/registered-entity").RegisterAPIMetadataTarget} target
29
+ * @param {*} aggregateInstance the aggregate instance calling the method
30
+ * @returns {Object}
31
+ */
32
+ export function getVersion2DuplicationAttributes(target: import("../../interfaces/registered-entity").RegisterAPIMetadataTarget, aggregateInstance: any): Object;
33
+ /**
34
+ * Determines if an event should be duplicated for a given target and aggregate instance. This is used to determine if duplication attributes should be added to an event and if the event should be sent to the soft nav feature for evaluation.
35
+ * @note This method is intended to be used in conjunction with getVersion2DuplicationAttributes and should be called before it to determine if duplication attributes should be added to an event.
36
+ * @param {import("../../interfaces/registered-entity").RegisterAPIMetadataTarget} target
37
+ * @param {*} aggregateInstance The aggregate instance calling the method. This is needed to check if duplication is enabled and if the harvest endpoint version supports it.
38
+ * @returns {boolean} returns true if the event should be duplicated for the target, false otherwise
39
+ */
40
+ export function shouldDuplicate(target: import("../../interfaces/registered-entity").RegisterAPIMetadataTarget, aggregateInstance: any): boolean;
41
+ /**
42
+ * Finds the registered targets from the stack trace for a given agent reference.
43
+ * @param {*} agentRef The agent reference to use for finding targets.
44
+ * @returns {Array} An array of targets found from the stack trace. If no targets are found or allowed, returns an array with undefined.
45
+ */
46
+ export function findTargetsFromStackTrace(agentRef: any): any[];
10
47
  /**
11
48
  * *
12
49
  */
@@ -1 +1 @@
1
- {"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../../../src/common/util/v2.js"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AACH,+CAJW,MAAM,sBACN,iBAAiB,GACf,MAAM,CAoBlB;;;;uBApCS,MAAM"}
1
+ {"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../../../src/common/util/v2.js"],"names":[],"mappings":"AAkBA;;;;;GAKG;AACH,+CAJW,MAAM,GAAC,MAAM,YACb,GAAC,GACC,OAAO,oCAAoC,EAAE,yBAAyB,EAAE,CAMpF;AAED;;;;;GAKG;AACH,2DAJW,MAAM,YACN,GAAC,GACC,OAAO,oCAAoC,EAAE,yBAAyB,EAAE,CAMpF;AAED;;;;;;;GAOG;AACH,+CAJW,MAAM,sBACN,iBAAiB,GACf,MAAM,CAclB;AAED;;;;;;;GAOG;AACH,yDAJW,OAAO,oCAAoC,EAAE,yBAAyB,qBACtE,GAAC,GACC,MAAM,CAKlB;AAED;;;;;;GAMG;AACH,wCAJW,OAAO,oCAAoC,EAAE,yBAAyB,qBACtE,GAAC,GACC,OAAO,CAInB;AAED;;;;GAIG;AACH,oDAHW,GAAC,SAkBX;;;;uBApGS,MAAM"}
@@ -6,7 +6,7 @@
6
6
  * event emitter will be based.
7
7
  * @returns {Object} Scoped event emitter with a debug ID of `fetch`.
8
8
  */
9
- export function wrapFetch(sharedEE: Object): Object;
9
+ export function wrapFetch(sharedEE: Object, agentRef: any): Object;
10
10
  /**
11
11
  * Returns an event emitter scoped specifically for the `fetch` context. This scoping is a remnant from when all the
12
12
  * features shared the same group in the event, to isolate events between features. It will likely be revisited.
@@ -1 +1 @@
1
- {"version":3,"file":"wrap-fetch.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-fetch.js"],"names":[],"mappings":"AAqBA;;;;;;;GAOG;AACH,oCAJW,MAAM,GAEJ,MAAM,CAqElB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
1
+ {"version":3,"file":"wrap-fetch.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-fetch.js"],"names":[],"mappings":"AAsBA;;;;;;;GAOG;AACH,oCAJW,MAAM,kBAEJ,MAAM,CA2ElB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
@@ -4,7 +4,7 @@
4
4
  * @param {boolean} always - If `true`, emit events even if already emitting an event.
5
5
  * @returns {function} The wrapped function.
6
6
  */
7
- export function createWrapperWithEmitter(emitter?: Object, always: boolean): Function;
7
+ export function createWrapperWithEmitter(emitter?: Object, always: boolean, agentRef: any): Function;
8
8
  /**
9
9
  * Copies properties from one object to another. Used for creating a wrapper function from an original function and for
10
10
  * copying an original function to a property of a wrapper function named by `flag` in the executing context.
@@ -1 +1 @@
1
- {"version":3,"file":"wrap-function.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-function.js"],"names":[],"mappings":"AA8BA;;;;;GAKG;AACH,mDAJW,MAAM,UACN,OAAO,YAmJjB;AAgBD;;;;;;;;GAQG;AACH,2BANW,MAAM,MACN,MAAM,YACN,MAAM,GAEJ,MAAM,CA2BlB;AA1ND,0BAA6C"}
1
+ {"version":3,"file":"wrap-function.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-function.js"],"names":[],"mappings":"AA+BA;;;;;GAKG;AACH,mDAJW,MAAM,UACN,OAAO,2BAyJjB;AAgBD;;;;;;;;GAQG;AACH,2BANW,MAAM,MACN,MAAM,YACN,MAAM,GAEJ,MAAM,CA2BlB;AAhOD,0BAA6C"}
@@ -6,7 +6,7 @@
6
6
  * @param {boolean} [autoCaptured=true] - True if log was captured from auto wrapping. False if it was captured from the API manual usage.
7
7
  * @returns {Object} Scoped event emitter with a debug ID of `logger`.
8
8
  */
9
- export function wrapLogger(sharedEE: Object, parent: Object, loggerFn: string, context: any, autoCaptured?: boolean): Object;
9
+ export function wrapLogger(sharedEE: Object, parent: Object, loggerFn: string, context: any, autoCaptured?: boolean, agentRef: any): Object;
10
10
  /**
11
11
  * Returns an event emitter scoped specifically for the `logger` context. This scoping is a remnant from when all the
12
12
  * features shared the same group in the event, to isolate events between features. It will likely be revisited.
@@ -1 +1 @@
1
- {"version":3,"file":"wrap-logger.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-logger.js"],"names":[],"mappings":"AAiBA;;;;;;;GAOG;AAEH,qCAPW,MAAM,UACN,MAAM,YACN,MAAM,+BACN,OAAO,GACL,MAAM,CAwBlB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
1
+ {"version":3,"file":"wrap-logger.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-logger.js"],"names":[],"mappings":"AAiBA;;;;;;;GAOG;AAEH,qCAPW,MAAM,UACN,MAAM,YACN,MAAM,+BACN,OAAO,kBACL,MAAM,CA0BlB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
@@ -4,7 +4,7 @@
4
4
  * @param {Object} sharedEE - The shared event emitter on which a new scoped event emitter will be based.
5
5
  * @returns {Object} Scoped event emitter with a debug ID of `xhr`.
6
6
  */
7
- export function wrapXhr(sharedEE: Object): Object;
7
+ export function wrapXhr(sharedEE: Object, agentRef: any): Object;
8
8
  /**
9
9
  * Returns an event emitter scoped specifically for the `xhr` context. This scoping is a remnant from when all the
10
10
  * features shared the same group in the event, to isolate events between features. It will likely be revisited.
@@ -1 +1 @@
1
- {"version":3,"file":"wrap-xhr.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-xhr.js"],"names":[],"mappings":"AAoBA;;;;;GAKG;AAEH,kCAJW,MAAM,GACJ,MAAM,CAiLlB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
1
+ {"version":3,"file":"wrap-xhr.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-xhr.js"],"names":[],"mappings":"AAqBA;;;;;GAKG;AAEH,kCAJW,MAAM,kBACJ,MAAM,CAkLlB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
@@ -1,7 +1,8 @@
1
1
  export class Aggregate extends AggregateBase {
2
2
  static featureName: string;
3
3
  constructor(agentRef: any);
4
- storeXhr(params: any, metrics: any, startTime: any, endTime: any, type: any, ctx: any): void;
4
+ storeXhr(params: any, metrics: any, startTime: any, endTime: any, type: any, target: any, ctx: any): void;
5
+ reportContainerEvent(evt: any, ctx: any): void;
5
6
  serializer(eventBuffer: any): string | undefined;
6
7
  }
7
8
  import { AggregateBase } from '../../utils/aggregate-base';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/ajax/aggregate/index.js"],"names":[],"mappings":"AAeA;IACE,2BAAiC;IAEjC,2BA0BC;IAED,6FAsEC;IAED,iDAmDC;CACF;8BAhK6B,4BAA4B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/ajax/aggregate/index.js"],"names":[],"mappings":"AAgBA;IACE,2BAAiC;IAEjC,2BA0BC;IAED,0GAuEC;IAED,+CAOC;IAED,iDAwDC;CACF;8BAhL6B,4BAA4B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/ajax/instrument/index.js"],"names":[],"mappings":"AA8BA;IACE,2BAAiC;IACjC,2BAkCC;IA/BC,OAA0B;IAE1B,8DAAkF;CA8BrF;AA0VD,qCAA8B;+BA9YC,6BAA6B;mBAFzC,uBAAuB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/ajax/instrument/index.js"],"names":[],"mappings":"AA8BA;IACE,2BAAiC;IACjC,2BAkCC;IA/BC,OAA0B;IAE1B,8DAAkF;CA8BrF;AA6VD,qCAA8B;+BAjZC,6BAA6B;mBAFzC,uBAAuB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/logging/aggregate/index.js"],"names":[],"mappings":"AAmBA;IACE,2BAAiC;IACjC,2BA4CC;IAzCG;;;MAAgC;IA2CpC,qIA+CC;IAED;;YAIM,0FAA0F;;;QAqB5F,0DAA0D;;QAM7D;IAED;;MAEC;IAED,yDAAyD;IACzD,yBAaC;;CAQF;8BAxK6B,4BAA4B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/logging/aggregate/index.js"],"names":[],"mappings":"AAmBA;IACE,2BAAiC;IACjC,2BA4CC;IAzCG;;;MAAgC;IA2CpC,qIA8CC;IAED;;YAIM,0FAA0F;;;QAqB5F,0DAA0D;;QAM7D;IAED;;MAEC;IAED,yDAAyD;IACzD,yBAaC;;CAQF;8BAvK6B,4BAA4B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/logging/instrument/index.js"],"names":[],"mappings":"AAcA;IACE,2BAAiC;IACjC,2BAsBC;CACF;AAED,wCAAiC;+BArCF,6BAA6B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/logging/instrument/index.js"],"names":[],"mappings":"AAcA;IACE,2BAAiC;IACjC,2BAwBC;CACF;AAED,wCAAiC;+BAvCF,6BAA6B"}
@@ -4,11 +4,11 @@
4
4
  * @param {{[key: string]: *}} customAttributes - The log's custom attributes if any
5
5
  * @param {enum} level - the log level enum
6
6
  * @param {boolean} [autoCaptured=true] - True if log was captured from auto wrapping. False if it was captured from the API manual usage.
7
- * @param {object=} target - the optional target provided by an api call
7
+ * @param {object=} targets - the optional targets found
8
8
  */
9
9
  export function bufferLog(ee: ContextualEE, message: string, customAttributes?: {
10
10
  [key: string]: any;
11
- }, level?: enum, autoCaptured?: boolean, target?: object | undefined, timestamp?: number): void;
11
+ }, level?: enum, autoCaptured?: boolean, targets?: object | undefined, timestamp?: number): void;
12
12
  /**
13
13
  * Checks if a supplied log level is acceptable for use in generating a log event
14
14
  * @param {string} level -- must be cast to uppercase before running this test
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/features/logging/shared/utils.js"],"names":[],"mappings":"AAUA;;;;;;;KAOK;AACL,8BAPa,YAAY,WACZ,MAAM,qBACN;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAC,CAAA;CAAC,UAClB,IAAI,iBACJ,OAAO,WACP,MAAM,YAAC,4BAKnB;AAED;;;;GAIG;AACH,uCAHW,MAAM,GACJ,OAAO,CAKnB"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/features/logging/shared/utils.js"],"names":[],"mappings":"AAUA;;;;;;;KAOK;AACL,8BAPa,YAAY,WACZ,MAAM,qBACN;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAC,CAAA;CAAC,UAClB,IAAI,iBACJ,OAAO,YACP,MAAM,YAAC,4BAKnB;AAED;;;;GAIG;AACH,uCAHW,MAAM,GACJ,OAAO,CAKnB"}
@@ -12,6 +12,7 @@ export class AjaxNode extends BelNode {
12
12
  traceId: any;
13
13
  spanTimestamp: any;
14
14
  gql: any;
15
+ targetAttributes: any;
15
16
  callbackEnd: any;
16
17
  serialize(parentStartTimestamp: any, agentRef: any): string;
17
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ajax-node.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/aggregate/ajax-node.js"],"names":[],"mappings":"AAQA;IACE,8CAqBC;IAnBC,gBAA6B;IAC7B,YAA8B;IAC9B,YAA8B;IAC9B,YAA8B;IAC9B,UAA0B;IAC1B,YAAmC;IACnC,YAAoC;IACpC,+BAAwD;IACxD,YAA8B;IAC9B,aAAgC;IAChC,mBAA4C;IAC5C,SAAwB;IAKtB,iBAAoE;IAKxE,4DA+BC;CACF;wBA1DuB,YAAY"}
1
+ {"version":3,"file":"ajax-node.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/aggregate/ajax-node.js"],"names":[],"mappings":"AAQA;IACE,8CAsBC;IApBC,gBAA6B;IAC7B,YAA8B;IAC9B,YAA8B;IAC9B,YAA8B;IAC9B,UAA0B;IAC1B,YAAmC;IACnC,YAAoC;IACpC,+BAAwD;IACxD,YAA8B;IAC9B,aAAgC;IAChC,mBAA4C;IAC5C,SAAwB;IACxB,sBAAkD;IAKhD,iBAAoE;IAKxE,4DAiCC;CACF;wBA7DuB,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/loaders/api/register.js"],"names":[],"mappings":"AA2BA;;;;GAIG;AACH,mDAIC;0BAdY,OAAO,sBAAsB,EAAE,WAAW"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/loaders/api/register.js"],"names":[],"mappings":"AA4BA;;;;GAIG;AACH,mDAIC;0BAdY,OAAO,sBAAsB,EAAE,WAAW"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newrelic/browser-agent",
3
- "version": "1.311.0",
3
+ "version": "1.312.0",
4
4
  "private": false,
5
5
  "author": "New Relic Browser Agent Team <browser-agent@newrelic.com>",
6
6
  "description": "New Relic Browser Agent",
@@ -213,7 +213,7 @@
213
213
  "url": "https://github.com/newrelic/newrelic-browser-agent.git"
214
214
  },
215
215
  "dependencies": {
216
- "@newrelic/rrweb": "1.0.1",
216
+ "@newrelic/rrweb": "1.1.0",
217
217
  "fflate": "0.8.2",
218
218
  "web-vitals": "4.2.4"
219
219
  },
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2020-2025 New Relic, Inc. All rights reserved.
2
+ * Copyright 2020-2026 New Relic, Inc. All rights reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { FEATURE_NAMES } from '../../loaders/features/features'
@@ -11,8 +11,7 @@ export const SESSION_ERROR = 'SESSION_ERROR'
11
11
 
12
12
  export const SUPPORTS_REGISTERED_ENTITIES = {
13
13
  [FEATURE_NAMES.logging]: true,
14
- // flip other features here when they are supported by DEM consumers
15
- [FEATURE_NAMES.genericEvents]: false,
16
- [FEATURE_NAMES.jserrors]: false,
17
- [FEATURE_NAMES.ajax]: false
14
+ [FEATURE_NAMES.genericEvents]: true,
15
+ [FEATURE_NAMES.jserrors]: true,
16
+ [FEATURE_NAMES.ajax]: true
18
17
  }