@newrelic/browser-agent 1.320.1-rc.0 → 1.320.1-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.
Files changed (157) hide show
  1. package/dist/cjs/common/config/runtime.js +3 -0
  2. package/dist/cjs/common/constants/env.cdn.js +1 -1
  3. package/dist/cjs/common/constants/env.npm.js +1 -1
  4. package/dist/cjs/common/dom/selector-path.js +1 -1
  5. package/dist/cjs/common/event-listener/event-listener-opts.js +1 -1
  6. package/dist/cjs/common/harvest/connector.js +200 -0
  7. package/dist/cjs/common/harvest/harvester.js +5 -8
  8. package/dist/cjs/common/harvest/send.js +8 -7
  9. package/dist/cjs/common/session/session-entity.js +1 -1
  10. package/dist/cjs/common/timer/interaction-timer.js +2 -2
  11. package/dist/cjs/common/unload/eol.js +3 -3
  12. package/dist/cjs/common/util/console.js +2 -1
  13. package/dist/cjs/common/util/feature-flags.js +2 -1
  14. package/dist/cjs/common/v2/constants.js +21 -0
  15. package/dist/cjs/common/v2/utils.js +25 -23
  16. package/dist/cjs/common/window/page-visibility.js +1 -1
  17. package/dist/cjs/common/wrap/wrap-events.js +4 -3
  18. package/dist/cjs/common/wrap/wrap-fetch.js +2 -2
  19. package/dist/cjs/common/wrap/wrap-function.js +1 -1
  20. package/dist/cjs/common/wrap/wrap-history.js +3 -2
  21. package/dist/cjs/common/wrap/wrap-xhr.js +2 -2
  22. package/dist/cjs/features/ajax/aggregate/index.js +1 -1
  23. package/dist/cjs/features/generic_events/aggregate/index.js +1 -1
  24. package/dist/cjs/features/generic_events/instrument/index.js +1 -1
  25. package/dist/cjs/features/jserrors/aggregate/index.js +5 -5
  26. package/dist/cjs/features/logging/instrument/index.js +1 -1
  27. package/dist/cjs/features/page_view_event/aggregate/index.js +2 -6
  28. package/dist/cjs/features/page_view_event/aggregate_v2/index.js +109 -0
  29. package/dist/cjs/features/page_view_event/instrument/index.js +6 -1
  30. package/dist/cjs/features/page_view_timing/aggregate/index.js +5 -1
  31. package/dist/cjs/features/session_replay/instrument/index.js +9 -0
  32. package/dist/cjs/features/session_replay/shared/recorder.js +2 -1
  33. package/dist/cjs/features/session_trace/instrument/index.js +3 -3
  34. package/dist/cjs/features/soft_navigations/instrument/index.js +2 -2
  35. package/dist/cjs/features/utils/aggregate-base.js +0 -12
  36. package/dist/cjs/features/utils/instrument-base.js +72 -29
  37. package/dist/cjs/loaders/agent.js +2 -1
  38. package/dist/cjs/loaders/api/consent.js +2 -2
  39. package/dist/cjs/loaders/api/register.js +8 -8
  40. package/dist/cjs/loaders/configure/configure.js +14 -0
  41. package/dist/cjs/loaders/features/features.js +2 -1
  42. package/dist/esm/common/config/runtime.js +3 -0
  43. package/dist/esm/common/constants/env.cdn.js +1 -1
  44. package/dist/esm/common/constants/env.npm.js +1 -1
  45. package/dist/esm/common/dom/selector-path.js +1 -1
  46. package/dist/esm/common/event-listener/event-listener-opts.js +1 -1
  47. package/dist/esm/common/harvest/connector.js +193 -0
  48. package/dist/esm/common/harvest/harvester.js +5 -8
  49. package/dist/esm/common/harvest/send.js +10 -9
  50. package/dist/esm/common/session/session-entity.js +1 -1
  51. package/dist/esm/common/timer/interaction-timer.js +2 -2
  52. package/dist/esm/common/unload/eol.js +3 -3
  53. package/dist/esm/common/util/console.js +2 -1
  54. package/dist/esm/common/util/feature-flags.js +2 -1
  55. package/dist/esm/common/v2/constants.js +15 -0
  56. package/dist/esm/common/v2/utils.js +24 -22
  57. package/dist/esm/common/window/page-visibility.js +1 -1
  58. package/dist/esm/common/wrap/wrap-events.js +4 -3
  59. package/dist/esm/common/wrap/wrap-fetch.js +2 -2
  60. package/dist/esm/common/wrap/wrap-function.js +1 -1
  61. package/dist/esm/common/wrap/wrap-history.js +3 -2
  62. package/dist/esm/common/wrap/wrap-xhr.js +2 -2
  63. package/dist/esm/features/ajax/aggregate/index.js +2 -2
  64. package/dist/esm/features/generic_events/aggregate/index.js +1 -1
  65. package/dist/esm/features/generic_events/instrument/index.js +1 -1
  66. package/dist/esm/features/jserrors/aggregate/index.js +6 -6
  67. package/dist/esm/features/logging/instrument/index.js +1 -1
  68. package/dist/esm/features/page_view_event/aggregate/index.js +2 -6
  69. package/dist/esm/features/page_view_event/aggregate_v2/index.js +100 -0
  70. package/dist/esm/features/page_view_event/instrument/index.js +6 -1
  71. package/dist/esm/features/page_view_timing/aggregate/index.js +5 -1
  72. package/dist/esm/features/session_replay/instrument/index.js +9 -0
  73. package/dist/esm/features/session_replay/shared/recorder.js +2 -1
  74. package/dist/esm/features/session_trace/instrument/index.js +3 -3
  75. package/dist/esm/features/soft_navigations/instrument/index.js +2 -2
  76. package/dist/esm/features/utils/aggregate-base.js +0 -12
  77. package/dist/esm/features/utils/instrument-base.js +71 -28
  78. package/dist/esm/loaders/agent.js +2 -1
  79. package/dist/esm/loaders/api/consent.js +2 -2
  80. package/dist/esm/loaders/api/register.js +1 -1
  81. package/dist/esm/loaders/configure/configure.js +14 -0
  82. package/dist/esm/loaders/features/features.js +1 -0
  83. package/dist/tsconfig.tsbuildinfo +1 -1
  84. package/dist/types/common/config/runtime.d.ts.map +1 -1
  85. package/dist/types/common/event-listener/event-listener-opts.d.ts +1 -1
  86. package/dist/types/common/harvest/connector.d.ts +6 -0
  87. package/dist/types/common/harvest/connector.d.ts.map +1 -0
  88. package/dist/types/common/harvest/harvester.d.ts.map +1 -1
  89. package/dist/types/common/harvest/send.d.ts.map +1 -1
  90. package/dist/types/common/unload/eol.d.ts +1 -1
  91. package/dist/types/common/unload/eol.d.ts.map +1 -1
  92. package/dist/types/common/util/console.d.ts +2 -1
  93. package/dist/types/common/util/console.d.ts.map +1 -1
  94. package/dist/types/common/v2/constants.d.ts +9 -0
  95. package/dist/types/common/v2/constants.d.ts.map +1 -0
  96. package/dist/types/common/v2/utils.d.ts +36 -11
  97. package/dist/types/common/v2/utils.d.ts.map +1 -1
  98. package/dist/types/common/wrap/wrap-events.d.ts +2 -1
  99. package/dist/types/common/wrap/wrap-events.d.ts.map +1 -1
  100. package/dist/types/common/wrap/wrap-history.d.ts +2 -1
  101. package/dist/types/common/wrap/wrap-history.d.ts.map +1 -1
  102. package/dist/types/features/page_view_event/aggregate/index.d.ts.map +1 -1
  103. package/dist/types/features/page_view_event/aggregate_v2/index.d.ts +20 -0
  104. package/dist/types/features/page_view_event/aggregate_v2/index.d.ts.map +1 -0
  105. package/dist/types/features/page_view_event/instrument/index.d.ts.map +1 -1
  106. package/dist/types/features/page_view_timing/aggregate/index.d.ts.map +1 -1
  107. package/dist/types/features/session_replay/instrument/index.d.ts +1 -0
  108. package/dist/types/features/session_replay/instrument/index.d.ts.map +1 -1
  109. package/dist/types/features/session_replay/shared/recorder.d.ts.map +1 -1
  110. package/dist/types/features/session_trace/instrument/index.d.ts.map +1 -1
  111. package/dist/types/features/utils/aggregate-base.d.ts +0 -5
  112. package/dist/types/features/utils/aggregate-base.d.ts.map +1 -1
  113. package/dist/types/features/utils/instrument-base.d.ts.map +1 -1
  114. package/dist/types/loaders/agent.d.ts.map +1 -1
  115. package/dist/types/loaders/configure/configure.d.ts.map +1 -1
  116. package/dist/types/loaders/features/features.d.ts +1 -0
  117. package/dist/types/loaders/features/features.d.ts.map +1 -1
  118. package/package.json +1 -1
  119. package/src/common/config/runtime.js +3 -0
  120. package/src/common/dom/selector-path.js +1 -1
  121. package/src/common/event-listener/event-listener-opts.js +1 -1
  122. package/src/common/harvest/connector.js +168 -0
  123. package/src/common/harvest/harvester.js +7 -9
  124. package/src/common/harvest/send.js +9 -7
  125. package/src/common/session/session-entity.js +1 -1
  126. package/src/common/timer/interaction-timer.js +2 -2
  127. package/src/common/unload/eol.js +3 -3
  128. package/src/common/util/console.js +2 -1
  129. package/src/common/util/feature-flags.js +1 -1
  130. package/src/common/v2/constants.js +15 -0
  131. package/src/common/v2/utils.js +23 -21
  132. package/src/common/window/page-visibility.js +1 -1
  133. package/src/common/wrap/wrap-events.js +4 -3
  134. package/src/common/wrap/wrap-fetch.js +2 -2
  135. package/src/common/wrap/wrap-function.js +1 -1
  136. package/src/common/wrap/wrap-history.js +3 -2
  137. package/src/common/wrap/wrap-xhr.js +2 -2
  138. package/src/features/ajax/aggregate/index.js +2 -2
  139. package/src/features/generic_events/aggregate/index.js +1 -1
  140. package/src/features/generic_events/instrument/index.js +1 -1
  141. package/src/features/jserrors/aggregate/index.js +6 -6
  142. package/src/features/logging/instrument/index.js +1 -1
  143. package/src/features/page_view_event/aggregate/index.js +2 -6
  144. package/src/features/page_view_event/aggregate_v2/index.js +97 -0
  145. package/src/features/page_view_event/instrument/index.js +6 -1
  146. package/src/features/page_view_timing/aggregate/index.js +5 -1
  147. package/src/features/session_replay/instrument/index.js +9 -0
  148. package/src/features/session_replay/shared/recorder.js +2 -1
  149. package/src/features/session_trace/instrument/index.js +3 -3
  150. package/src/features/soft_navigations/instrument/index.js +2 -2
  151. package/src/features/utils/aggregate-base.js +0 -12
  152. package/src/features/utils/instrument-base.js +71 -25
  153. package/src/loaders/agent.js +2 -1
  154. package/src/loaders/api/consent.js +2 -2
  155. package/src/loaders/api/register.js +1 -1
  156. package/src/loaders/configure/configure.js +12 -0
  157. package/src/loaders/features/features.js +1 -0
@@ -17,7 +17,7 @@ import { AggregateBase } from '../../utils/aggregate-base';
17
17
  import { now } from '../../../common/timing/now';
18
18
  import { Obfuscator } from '../../../common/util/obfuscate';
19
19
  import { evaluateInternalError } from './internal-errors';
20
- import { getRegisteredTargetsFromFilename, getVersion2Attributes, getVersion2DuplicationAttributes, shouldDuplicate } from '../../../common/v2/utils';
20
+ import { getRegisteredTargetsFromFilename, getVersion2Attributes, getVersion2DuplicationAttributes, shouldDuplicate, isMfeTarget } from '../../../common/v2/utils';
21
21
  import { buildCauseString } from './cause-string';
22
22
  import { ShortCircuit } from '../../../common/util/short-circuit';
23
23
  import { EVENT_TYPES } from '../../../common/constants/events';
@@ -205,7 +205,7 @@ export class Aggregate extends AggregateBase {
205
205
  if (targets.length) break;
206
206
  }
207
207
  }
208
- if (!targets.length) targets.push(undefined);
208
+ if (!targets.length) targets.push(this.agentRef.runtime.v2Target);
209
209
  }
210
210
  return targets;
211
211
  }
@@ -249,7 +249,7 @@ export class Aggregate extends AggregateBase {
249
249
  if (filterOutput?.group) params.errorGroup = filterOutput.group;
250
250
 
251
251
  // Should only decorate "hasReplay" for the container agent, so check if the target matches the config
252
- if (hasReplay && !target) params.hasReplay = hasReplay;
252
+ if (hasReplay && !isMfeTarget(target)) params.hasReplay = hasReplay;
253
253
  /**
254
254
  * The bucketHash is different from the params.stackHash because the params.stackHash is based on the canonicalized
255
255
  * stack trace and is used downstream in NR1 to attempt to group the same errors across different browsers. However,
@@ -284,13 +284,13 @@ export class Aggregate extends AggregateBase {
284
284
 
285
285
  // Trace sends the error in its payload, and both trace & replay simply listens for any error to occur.
286
286
  const jsErrorEvent = [type, bucketHash, params, newMetrics, customAttributes];
287
- if (!target) handle('trace-jserror', jsErrorEvent, undefined, FEATURE_NAMES.sessionTrace, this.ee);
287
+ if (!isMfeTarget(target)) handle('trace-jserror', jsErrorEvent, undefined, FEATURE_NAMES.sessionTrace, this.ee);
288
288
  // still send EE events for other features such as above, but stop this one from aggregating internal data
289
289
  if (this.blocked) return;
290
290
  if (err.__newrelic?.socketId) {
291
291
  customAttributes.socketId = err.__newrelic.socketId;
292
292
  }
293
- if (!target) {
293
+ if (!isMfeTarget(target)) {
294
294
  const softNavInUse = Boolean(this.agentRef.features?.[FEATURE_NAMES.softNav]);
295
295
  if (softNavInUse) {
296
296
  // pass the error to soft nav for evaluation - it will return it via 'returnJserror' when interaction is resolved
@@ -301,7 +301,7 @@ export class Aggregate extends AggregateBase {
301
301
  }
302
302
 
303
303
  // always add directly if scoped to a sub-entity, the other pathways above will be deterministic if the main agent should procede
304
- if (target) this.#storeJserrorForHarvest(jsErrorEvent, {}, target);
304
+ if (isMfeTarget(target)) this.#storeJserrorForHarvest(jsErrorEvent, {}, target);
305
305
  }
306
306
 
307
307
  /**
@@ -30,7 +30,7 @@ export class Instrument extends InstrumentBase {
30
30
  });
31
31
 
32
32
  /** emitted by wrap-logger function */
33
- this.ee.on('wrap-logger-end', function handleLog([message], _, __, targets = []) {
33
+ this.ee.on('wrap-logger-end', function handleLog([message], _, __, targets = [agentRef.runtime.v2Target]) {
34
34
  const {
35
35
  level,
36
36
  customAttributes,
@@ -132,9 +132,7 @@ export class Aggregate extends AggregateBase {
132
132
  return queryParameters;
133
133
  };
134
134
  this.events.add(body);
135
- if (this.agentRef.runtime.harvester.triggerHarvestFor(this, {
136
- sendEmptyBody: true
137
- }).ranSend) this.sentRum = true;
135
+ if (this.agentRef.runtime.harvester.triggerHarvestFor(this).ranSend) this.sentRum = true;
138
136
  }
139
137
  serializer(eventBuffer) {
140
138
  // this is necessary because PVE sends a single item rather than an array; in the case of undefined, this prevents sending [null] as body
@@ -175,9 +173,7 @@ export class Aggregate extends AggregateBase {
175
173
 
176
174
  if (this.isRetrying && this.retries++ < 1) {
177
175
  // Only retry once
178
- setTimeout(() => this.agentRef.runtime.harvester.triggerHarvestFor(this, {
179
- sendEmptyBody: true
180
- }), 5000); // Retry sending the RUM event after 5 seconds
176
+ setTimeout(() => this.agentRef.runtime.harvester.triggerHarvestFor(this), 5000); // Retry sending the RUM event after 5 seconds
181
177
  return;
182
178
  }
183
179
  if (status >= 400 || status === 0) {
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Copyright 2020-2026 New Relic, Inc. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { globalScope, isBrowserScope, originTime, getNavigationEntry } from '../../../common/constants/runtime';
6
+ import { addPT, addPN } from '../../../common/timing/nav-timing';
7
+ import { stringify } from '../../../common/util/stringify';
8
+ import * as CONSTANTS from '../constants';
9
+ import { getActivatedFeaturesFlags } from '../aggregate/initialized-features';
10
+ import { AggregateBase } from '../../utils/aggregate-base';
11
+ import { firstContentfulPaint } from '../../../common/vitals/first-contentful-paint';
12
+ import { firstPaint } from '../../../common/vitals/first-paint';
13
+ import { timeToFirstByte } from '../../../common/vitals/time-to-first-byte';
14
+ import { Obfuscator } from '../../../common/util/obfuscate';
15
+ import { webdriverDetected } from '../../../common/util/webdriver-detection';
16
+ import { EVENT_TYPES } from '../../../common/constants/events';
17
+ export class Aggregate extends AggregateBase {
18
+ static featureName = CONSTANTS.FEATURE_NAME;
19
+ #timeToFirstByte = 0;
20
+ #firstByteToWindowLoad = 0; // our "frontend" duration
21
+ #firstByteToDomContent = 0; // our "dom processing" duration
22
+ #obfuscator;
23
+ constructor(agentRef) {
24
+ super(agentRef, CONSTANTS.FEATURE_NAME);
25
+ this.#obfuscator = new Obfuscator(agentRef, EVENT_TYPES.PVE);
26
+ if (isBrowserScope) {
27
+ timeToFirstByte.subscribe(({
28
+ value,
29
+ attrs
30
+ }) => {
31
+ const navEntry = attrs.navigationEntry;
32
+ this.#timeToFirstByte = Math.max(value, this.#timeToFirstByte);
33
+ this.#firstByteToWindowLoad = Math.max(Math.round(navEntry.loadEventEnd - this.#timeToFirstByte), this.#firstByteToWindowLoad); // our "frontend" duration
34
+ this.#firstByteToDomContent = Math.max(Math.round(navEntry.domContentLoadedEventEnd - this.#timeToFirstByte), this.#firstByteToDomContent); // our "dom processing" duration
35
+ });
36
+ }
37
+ this.waitForFlags([]).then(() => {
38
+ const body = this.#obfuscator.traverseAndObfuscateEvents({
39
+ ja: {
40
+ ...agentRef.info.jsAttributes,
41
+ webdriverDetected
42
+ }
43
+ });
44
+ this.events.add(body);
45
+ this.drain();
46
+ });
47
+ }
48
+ queryStringsBuilder() {
49
+ const info = this.agentRef.info;
50
+ const measures = {};
51
+ if (info.queueTime) measures.qt = info.queueTime;
52
+ if (info.applicationTime) measures.ap = info.applicationTime;
53
+
54
+ // These 3 values should've been recorded after load and before this func runs. They are part of the minimum required for PageView events to be created.
55
+ // Following PR #428, which demands that the BA must drive entity indexing, these need to be sent even outside of the main window context where PerformanceTiming
56
+ // or PerformanceNavigationTiming do not exists. Hence, they'll be filled in by 0s instead in, for example, worker threads that still init the PVE module.
57
+ measures.be = this.#timeToFirstByte;
58
+ measures.fe = this.#firstByteToWindowLoad;
59
+ measures.dc = this.#firstByteToDomContent;
60
+ const queryParameters = {
61
+ at: info.atts,
62
+ af: getActivatedFeaturesFlags(this.agentRef).join(','),
63
+ igp: this.agentRef.runtime.appMetadata.igp,
64
+ ...measures,
65
+ fp: firstPaint.current.value,
66
+ fcp: firstContentfulPaint.current.value
67
+ };
68
+ if (globalScope.performance) {
69
+ const navTimingEntry = getNavigationEntry();
70
+ if (navTimingEntry) {
71
+ // Navigation Timing level 2 API that replaced PerformanceTiming & PerformanceNavigation
72
+ const perf = {
73
+ timing: addPT(originTime, navTimingEntry, {}),
74
+ navigation: addPN(navTimingEntry, {})
75
+ };
76
+ queryParameters.perf = stringify(perf);
77
+ } else if (typeof PerformanceTiming !== 'undefined') {
78
+ // Modern Safari iFrames and Safari pre-15 do not support level 2 timing.
79
+ const perf = {
80
+ timing: addPT(originTime, globalScope.performance.timing, {}, true),
81
+ navigation: addPN(globalScope.performance.navigation, {})
82
+ };
83
+ queryParameters.perf = stringify(perf);
84
+ }
85
+ }
86
+ const {
87
+ correctedOriginTime
88
+ } = this.agentRef.runtime.timeKeeper;
89
+ if (correctedOriginTime) queryParameters.timestamp = correctedOriginTime; // a "PageView" is set to represent the page's (server adjusted) origin time rather than when event is recorded/harvested
90
+
91
+ return queryParameters;
92
+ }
93
+ get harvestEndpointVersion() {
94
+ return 2;
95
+ }
96
+ serializer(eventBuffer) {
97
+ // this is necessary because PVE sends a single item rather than an array; in the case of undefined, this prevents sending [null] as body
98
+ return eventBuffer[0];
99
+ }
100
+ }
@@ -18,7 +18,12 @@ export class Instrument extends InstrumentBase {
18
18
 
19
19
  /** feature specific APIs */
20
20
  setupSetPageViewNameAPI(agentRef);
21
- this.importAggregator(agentRef, () => import(/* webpackChunkName: "page_view_event-aggregate" */'../aggregate'));
21
+ this.importAggregator(agentRef, () => {
22
+ if (agentRef.init.feature_flags.includes('rum_v2')) {
23
+ return import(/* webpackChunkName: "page_view_event-aggregate" */'../aggregate_v2');
24
+ }
25
+ return import(/* webpackChunkName: "page_view_event-aggregate" */'../aggregate');
26
+ });
22
27
  }
23
28
  setupInspectionEvents() {
24
29
  const dispatch = (evt, name) => {
@@ -66,7 +66,11 @@ export class Aggregate extends AggregateBase {
66
66
  } = cumulativeLayoutShift.current;
67
67
  if (value === undefined) return;
68
68
  this.addTiming(name, value * 1000, attrs);
69
- }, true, true); // CLS node should only reports on vis change rather than on every change
69
+ }, true, true); // CLS node should only report on vis change rather than on every change.
70
+ /* NOTE: the capture=true is required -- empirically verified against a real browser (Chrome) for CLS
71
+ timing node to reliably be in the same final harvest as the rest, alongside Harvester#startTimer's
72
+ queueMicrotask deferral of the EOL harvest itself. Dropping this flag caused CLS to be split into its own,
73
+ separate, later harvest instead of going out together with pageHide/INP. */
70
74
 
71
75
  this.drain();
72
76
  });
@@ -40,6 +40,10 @@ export class Instrument extends InstrumentBase {
40
40
  recorder.startRecording(TRIGGERS.PRELOAD, session?.sessionReplayMode);
41
41
  }); // could handle specific fail-state behaviors with a .catch block here
42
42
  }
43
+
44
+ // If the aggregate never successfully loads (missing session prerequisite, or the aggregate module itself
45
+ // fails to import/construct), any preload recording that already started needs to be stopped.
46
+ this.abortHandler = this.#abort;
43
47
  this.importAggregator(this.agentRef, () => import(/* webpackChunkName: "session_replay-aggregate" */'../aggregate'), this);
44
48
 
45
49
  /** If the recorder is running, we can pass error events on to the agg to help it switch to full mode later */
@@ -104,5 +108,10 @@ export class Instrument extends InstrumentBase {
104
108
  }); // could handle specific fail-state behaviors with a .catch block here
105
109
  }
106
110
  }
111
+
112
+ /** Stops any preload recording that already started if the aggregate never ends up successfully loading. */
113
+ #abort() {
114
+ this.recorder?.stopRecording();
115
+ }
107
116
  }
108
117
  export const SessionReplay = Instrument;
@@ -209,7 +209,8 @@ export class Recorder {
209
209
 
210
210
  // We are making an effort to try to keep payloads manageable for unloading. If they reach the unload limit before their interval,
211
211
  // it will send immediately. This often happens on the first snapshot, which can be significantly larger than the other payloads.
212
- if ((this.events.hasSnapshot && this.events.hasMeta || payloadSize > IDEAL_PAYLOAD_SIZE) && !this.isErrorMode) {
212
+ // (the aggregate may not exist yet/at all if its own bootstrap hasn't finished or failed -- nothing to harvest for in that case.)
213
+ if ((this.events.hasSnapshot && this.events.hasMeta || payloadSize > IDEAL_PAYLOAD_SIZE) && !this.isErrorMode && this.srInstrument.featAggregate) {
213
214
  // if we've made it to the ideal size of ~16kb before the interval timer, we should send early.
214
215
  this.agentRef.runtime.harvester.triggerHarvestFor(this.srInstrument.featAggregate);
215
216
  }
@@ -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';
@@ -36,8 +36,8 @@ export class Instrument extends InstrumentBase {
36
36
  return;
37
37
  }
38
38
  const thisInstrumentEE = this.ee;
39
- wrapHistory(thisInstrumentEE);
40
- this.eventsEE = wrapEvents(thisInstrumentEE);
39
+ wrapHistory(thisInstrumentEE, agentRef);
40
+ this.eventsEE = wrapEvents(thisInstrumentEE, agentRef);
41
41
  this.eventsEE.on(FN_START, function (args, target) {
42
42
  this.bstStart = now();
43
43
  });
@@ -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';
@@ -29,7 +29,7 @@ export class Instrument extends InstrumentBase {
29
29
  setupInteractionAPI(agentRef);
30
30
  if (!isBrowserScope || !gosNREUMOriginals().o.MO) return; // soft navigations is not supported outside web env or browsers without the mutation observer API
31
31
 
32
- const historyEE = wrapHistory(this.ee);
32
+ const historyEE = wrapHistory(this.ee, agentRef);
33
33
  try {
34
34
  this.removeOnAbort = new AbortController();
35
35
  } catch (e) {}
@@ -5,7 +5,6 @@
5
5
  import { FeatureBase } from './feature-base';
6
6
  import { drain } from '../../common/drain/drain';
7
7
  import { FEATURE_NAMES } from '../../loaders/features/features';
8
- import { Harvester } from '../../common/harvest/harvester';
9
8
  import { EventBuffer } from './event-buffer';
10
9
  import { handle } from '../../common/event-emitter/handle';
11
10
  import { SUPPORTABILITY_METRIC_CHANNEL } from '../metrics/constants';
@@ -20,7 +19,6 @@ export class AggregateBase extends FeatureBase {
20
19
  */
21
20
  constructor(agentRef, featureName) {
22
21
  super(agentRef, featureName);
23
- this.doOnceForAllAggregate(agentRef);
24
22
 
25
23
  /** @type {Boolean} indicates if custom attributes are combined in each event payload for size estimation purposes. this is set to true in derived classes that need to evaluate custom attributes separately from the event payload */
26
24
  this.customAttributesAreSeparate = false;
@@ -172,16 +170,6 @@ export class AggregateBase extends FeatureBase {
172
170
  this.events.clearSave(this.harvestOpts);
173
171
  }
174
172
 
175
- /**
176
- * These are actions related to shared resources that should be initialized once by whichever feature Aggregate subclass loads first.
177
- * This method should run after checkConfiguration, which may reset the agent's info/runtime object that is used here.
178
- */
179
- doOnceForAllAggregate(agentRef) {
180
- // Note: obfuscator is now created per-feature for their specific event types
181
-
182
- if (!agentRef.runtime.harvester) agentRef.runtime.harvester = new Harvester(agentRef);
183
- }
184
-
185
173
  /**
186
174
  * Report a supportability metric
187
175
  * @param {*} metricName The tag of the name matching the Angler aggregation tag
@@ -24,6 +24,7 @@ import { single } from '../../common/util/invoke';
24
24
  import { SESSION_ERROR } from '../../common/constants/agent-constants';
25
25
  import { handle } from '../../common/event-emitter/handle';
26
26
  const checkedAgents = new WeakSet();
27
+ const runtimeBootstrapPromises = new WeakMap();
27
28
 
28
29
  /**
29
30
  * Base class for instrumenting a feature.
@@ -99,32 +100,14 @@ export class InstrumentBase extends FeatureBase {
99
100
  this.loadedSuccessfully(false);
100
101
  return;
101
102
  }
102
- let session;
103
103
  try {
104
- if (canEnableSessionTracking(agentRef.init)) {
105
- // would require some setup before certain features start
106
- const {
107
- setupAgentSession
108
- } = await import(/* webpackChunkName: "session-manager" */'./agent-session');
109
- session = setupAgentSession(agentRef);
110
- }
104
+ // in the interest of keeping loader file size small, some modules are lazy-loaded as part of the larger async chunk
105
+ await ensureRuntimeBootstrap(agentRef, this.ee, this.featureName);
111
106
  } catch (e) {
112
- warn(20, e);
113
- this.ee.emit('internal-error', [e]);
114
- handle(SESSION_ERROR, [e], undefined, this.featureName, this.ee);
115
- }
116
- if (agentRef.init.api.register.allow_iframe_bridge) {
117
- try {
118
- // This chunk doesn't exist in the lite build (see webpack IgnorePlugin config) since none
119
- // of lite's features wire up agent.register -- guard against that rather than letting an
120
- // unhandled rejection surface if this flag is ever set on a lite page.
121
- const {
122
- setupIframeMFEMessageListener
123
- } = await import(/* webpackChunkName: "iframe-message-handler" */'../../loaders/configure/iframe-message-handler');
124
- setupIframeMFEMessageListener(agentRef);
125
- } catch (e) {
126
- warn(23, e);
127
- }
107
+ warn(79, e);
108
+ this.ee.abort(); // failed Connector or Harvester will cause entire agent to shutdown
109
+ this.loadedSuccessfully(false);
110
+ return;
128
111
  }
129
112
 
130
113
  /**
@@ -132,7 +115,8 @@ export class InstrumentBase extends FeatureBase {
132
115
  * it's only responsible for aborting its one specific feature, rather than all.
133
116
  */
134
117
  try {
135
- if (!this.#shouldImportAgg(this.featureName, session, agentRef.init)) {
118
+ if (!this.#shouldImportAgg(this.featureName, agentRef.runtime.session, agentRef.init)) {
119
+ this.abortHandler?.();
136
120
  drain(this.agentRef, this.featureName);
137
121
  this.loadedSuccessfully(false); // aggregate module isn't loaded at all
138
122
  return;
@@ -141,15 +125,14 @@ export class InstrumentBase extends FeatureBase {
141
125
  Aggregate
142
126
  } = await fetchAggregator();
143
127
  this.featAggregate = new Aggregate(agentRef, argsObjFromInstrument);
144
- agentRef.runtime.harvester.initializedAggregates.push(this.featAggregate); // "subscribe" the feature to future harvest intervals (PVE will start the timer)
128
+ agentRef.runtime.harvester.initializedAggregates.push(this.featAggregate); // "subscribe" the feature to future harvest intervals
145
129
  this.loadedSuccessfully(true);
146
130
  } catch (e) {
147
131
  warn(34, e);
148
- this.abortHandler?.(); // undo any important alterations made to the page
132
+ this.abortHandler?.();
149
133
  // not supported yet but nice to do: "abort" this agent's EE for this feature specifically
150
134
  drain(this.agentRef, this.featureName, true);
151
135
  this.loadedSuccessfully(false);
152
- if (this.ee) this.ee.abort();
153
136
  }
154
137
  };
155
138
 
@@ -208,4 +191,64 @@ export class InstrumentBase extends FeatureBase {
208
191
  }, existingAgent.runtime.loaderType);
209
192
  }
210
193
  }
194
+ }
195
+
196
+ /**
197
+ * Lazily initializes the shared runtime bootstrap for a given agent exactly once. This loads session setup, Connector, and
198
+ * Harvester through shared async chunks and returns the same in-flight Promise to any concurrent callers.
199
+ *
200
+ * Session setup failures are reported but do not stop bootstrap. Connector or Harvester failures are allowed to bubble so the caller can abort the agent.
201
+ *
202
+ * @param {Object} agentRef - The agent reference object.
203
+ * @param {Object} ee - The feature event emitter used for error reporting.
204
+ * @param {string} featureName - The feature name used when reporting session setup errors.
205
+ * @returns {Promise<void>} Resolves when the shared bootstrap completes.
206
+ */
207
+ async function ensureRuntimeBootstrap(agentRef, ee, featureName) {
208
+ if (runtimeBootstrapPromises.has(agentRef)) return runtimeBootstrapPromises.get(agentRef);
209
+ const bootstrapPromise = (async () => {
210
+ if (canEnableSessionTracking(agentRef.init)) {
211
+ try {
212
+ const {
213
+ setupAgentSession
214
+ } = await import(/* webpackChunkName: "session-manager" */'./agent-session');
215
+ setupAgentSession(agentRef); // sets agentRef.runtime.session, if successful
216
+ } catch (e) {
217
+ warn(20, e);
218
+ ee.emit('internal-error', [e]);
219
+ handle(SESSION_ERROR, [e], undefined, featureName, ee);
220
+ }
221
+ }
222
+ if (agentRef.init.api.register.allow_iframe_bridge) {
223
+ try {
224
+ // This chunk doesn't exist in the lite build (see webpack IgnorePlugin config) since none
225
+ // of lite's features wire up agent.register -- guard against that rather than letting an
226
+ // unhandled rejection surface if this flag is ever set on a lite page.
227
+ const {
228
+ setupIframeMFEMessageListener
229
+ } = await import(/* webpackChunkName: "iframe-message-handler" */'../../loaders/configure/iframe-message-handler');
230
+ setupIframeMFEMessageListener(agentRef);
231
+ } catch (e) {
232
+ warn(23, e);
233
+ }
234
+ }
235
+ const [{
236
+ Connector
237
+ }, {
238
+ Harvester
239
+ }] = await Promise.all([import(/* webpackChunkName: "connector" */'../../common/harvest/connector'), import(/* webpackChunkName: "harvester" */'../../common/harvest/harvester')]);
240
+ agentRef.runtime.connector = new Connector(agentRef);
241
+ agentRef.runtime.harvester = new Harvester(agentRef);
242
+
243
+ /* Wait for auto-started features' aggregates to load before starting the harvest timer, so Harvester's EOL
244
+ listener registers after aggregate-level listeners like web-vitals' CWV APIs. Not awaited here to avoid
245
+ deadlock, since every feature awaits this same bootstrap promise before its own aggregate load.
246
+ Only auto-started features are waited on: an autoStart:false feature only registers in drainRegistry once
247
+ `start` is called, so filtering on that registry excludes any feature that's never started instead of
248
+ blocking startTimer() forever. */
249
+ const autoStartedFeatures = Object.values(agentRef.features).filter(feature => agentRef.runtime.drainRegistry.has(feature.featureName));
250
+ Promise.all(autoStartedFeatures.map(feature => feature.onAggregateImported)).then(() => agentRef.runtime.harvester.startTimer());
251
+ })();
252
+ runtimeBootstrapPromises.set(agentRef, bootstrapPromise);
253
+ await bootstrapPromise;
211
254
  }
@@ -86,9 +86,10 @@ export class Agent extends AgentBase {
86
86
  try {
87
87
  const enabledFeatures = getEnabledFeatures(this.init);
88
88
  const featuresToStart = [...this.desiredFeatures];
89
+ const isRumV2Enabled = this.init.feature_flags.includes('rum_v2');
89
90
  featuresToStart.sort((a, b) => featurePriority[a.featureName] - featurePriority[b.featureName]);
90
91
  featuresToStart.forEach(InstrumentCtor => {
91
- if (!enabledFeatures[InstrumentCtor.featureName] && InstrumentCtor.featureName !== FEATURE_NAMES.pageViewEvent) return; // PVE is required to run even if it's marked disabled
92
+ if (!enabledFeatures[InstrumentCtor.featureName] && (isRumV2Enabled || InstrumentCtor.featureName !== FEATURE_NAMES.pageViewEvent)) return; // PVE is required to run even if it's marked disabled unless rum_v2 is enabled
92
93
 
93
94
  const dependencies = getFeatureDependencyNames(InstrumentCtor.featureName);
94
95
  const missingDependencies = dependencies.filter(featName => !(featName in this.features)); // any other feature(s) this depends on should've been initialized on prior iterations by priority order
@@ -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 { prefix, CONSENT } from './constants';
@@ -22,7 +22,7 @@ export function setupConsentAPI(agent) {
22
22
  pveInst.onAggregateImported.then(loaded => {
23
23
  const pveAgg = pveInst.featAggregate;
24
24
  if (loaded && !pveAgg.sentRum) {
25
- pveAgg.sendRum();
25
+ pveAgg.sendRum?.(); // only the old v1 aggregate has a sendRum method that acts as a blocker for the rest of the agent; v2 aggregate will auto report when harvester becomes unblocked
26
26
  }
27
27
  });
28
28
  }
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { handle } from '../../common/event-emitter/handle';
6
6
  import { warn } from '../../common/util/console';
7
- import { V2_TYPES } from '../../common/v2/utils';
7
+ import { V2_TYPES } from '../../common/v2/constants';
8
8
  import { FEATURE_NAMES } from '../features/features';
9
9
  import { now } from '../../common/timing/now';
10
10
  import { SUPPORTABILITY_METRIC_CHANNEL } from '../../features/metrics/constants';
@@ -7,6 +7,7 @@ import { gosCDN } from '../../common/window/nreum';
7
7
  import { mergeInfo } from '../../common/config/info';
8
8
  import { mergeInit } from '../../common/config/init';
9
9
  import { mergeRuntime } from '../../common/config/runtime';
10
+ import { V2_TYPES } from '../../common/v2/constants';
10
11
  import { isWorkerScope, globalScope } from '../../common/constants/runtime';
11
12
  import { redefinePublicPath } from './public-path';
12
13
  import { ee } from '../../common/event-emitter/contextual-ee';
@@ -46,6 +47,19 @@ export function configure(agent, opts = {}, loaderType, forceDrain) {
46
47
  agent.info = mergeInfo(info);
47
48
  const updatedInit = agent.init;
48
49
  agent.runtime ??= mergeRuntime(runtime);
50
+ agent.runtime.v2Target ??= {
51
+ type: V2_TYPES.BA,
52
+ instance: agent.agentIdentifier,
53
+ get id() {
54
+ return agent.runtime.appMetadata?.agents?.[0]?.entityGuid;
55
+ },
56
+ get attributes() {
57
+ return {
58
+ 'entity.guid': this.id,
59
+ appId: agent.info.applicationID
60
+ };
61
+ }
62
+ };
49
63
 
50
64
  // Apply proxy settings whenever configure is called (supports late {init} setting)
51
65
  if (updatedInit.proxy.assets) {
@@ -8,6 +8,7 @@ export const EVENTS = 'events';
8
8
  export const JSERRORS = 'jserrors';
9
9
  export const BLOBS = 'browser/blobs';
10
10
  export const RUM = 'rum';
11
+ export const CONNECT = 'connect';
11
12
  export const LOGS = 'browser/logs';
12
13
  export const FEATURE_NAMES = {
13
14
  ajax: 'ajax',
@@ -1 +1 @@
1
- {"root":["../src/index.js","../src/cdn/experimental.js","../src/cdn/lite.js","../src/cdn/pro.js","../src/cdn/spa.js","../src/common/aggregate/aggregator.js","../src/common/aggregate/event-aggregator.js","../src/common/config/configurable.js","../src/common/config/info.js","../src/common/config/init-types.js","../src/common/config/init.js","../src/common/config/loader-config.js","../src/common/config/runtime.js","../src/common/constants/agent-constants.js","../src/common/constants/env.cdn.js","../src/common/constants/env.js","../src/common/constants/env.npm.js","../src/common/constants/events.js","../src/common/constants/iframe-constants.js","../src/common/constants/runtime.js","../src/common/constants/shared-channel.js","../src/common/deny-list/deny-list.js","../src/common/dispatch/global-event.js","../src/common/dom/iframe.js","../src/common/dom/query-selector.js","../src/common/dom/selector-path.js","../src/common/drain/drain.js","../src/common/event-emitter/contextual-ee.js","../src/common/event-emitter/event-context.js","../src/common/event-emitter/handle.js","../src/common/event-emitter/register-handler.js","../src/common/event-listener/event-listener-opts.js","../src/common/harvest/harvester.js","../src/common/harvest/send.js","../src/common/harvest/types.js","../src/common/ids/bundle-id.js","../src/common/ids/id.js","../src/common/ids/unique-id.js","../src/common/payloads/payloads.js","../src/common/serialize/bel-serializer.js","../src/common/session/constants.js","../src/common/session/session-entity.js","../src/common/session/session-key.js","../src/common/storage/local-storage.js","../src/common/timer/interaction-timer.js","../src/common/timer/timer.js","../src/common/timing/nav-timing.js","../src/common/timing/now.js","../src/common/timing/time-keeper.js","../src/common/unload/eol.js","../src/common/url/add-url.js","../src/common/url/canonicalize-url.js","../src/common/url/clean-url.js","../src/common/url/encode.js","../src/common/url/extract-url.js","../src/common/url/location.js","../src/common/url/parse-url.js","../src/common/url/protocol.js","../src/common/util/attribute-size.js","../src/common/util/browser-stack-matchers.js","../src/common/util/console.js","../src/common/util/data-size.js","../src/common/util/event-origin.js","../src/common/util/feature-flags.js","../src/common/util/get-or-set.js","../src/common/util/invoke.js","../src/common/util/monkey-patched.js","../src/common/util/obfuscate.js","../src/common/util/short-circuit.js","../src/common/util/stringify.js","../src/common/util/submit-data.js","../src/common/util/text.js","../src/common/util/traverse.js","../src/common/util/type-check.js","../src/common/util/webdriver-detection.js","../src/common/v2/mfe-vitals.js","../src/common/v2/script-correlation.js","../src/common/v2/script-tracker-constants.js","../src/common/v2/script-tracker.js","../src/common/v2/timing-factory.js","../src/common/v2/utils.js","../src/common/vitals/constants.js","../src/common/vitals/cumulative-layout-shift.js","../src/common/vitals/first-contentful-paint.js","../src/common/vitals/first-paint.js","../src/common/vitals/interaction-to-next-paint.js","../src/common/vitals/largest-contentful-paint.js","../src/common/vitals/load-time.js","../src/common/vitals/time-to-first-byte.js","../src/common/vitals/vital-metric.js","../src/common/window/load.js","../src/common/window/nreum.js","../src/common/window/page-visibility.js","../src/common/wrap/wrap-events.js","../src/common/wrap/wrap-fetch.js","../src/common/wrap/wrap-function.js","../src/common/wrap/wrap-history.js","../src/common/wrap/wrap-logger.js","../src/common/wrap/wrap-websocket.js","../src/common/wrap/wrap-xhr.js","../src/features/ajax/constants.js","../src/features/ajax/index.js","../src/features/ajax/aggregate/gql.js","../src/features/ajax/aggregate/index.js","../src/features/ajax/instrument/distributed-tracing.js","../src/features/ajax/instrument/index.js","../src/features/ajax/instrument/response-size.js","../src/features/generic_events/constants.js","../src/features/generic_events/index.js","../src/features/generic_events/aggregate/index.js","../src/features/generic_events/aggregate/user-actions/aggregated-user-action.js","../src/features/generic_events/aggregate/user-actions/user-actions-aggregator.js","../src/features/generic_events/instrument/index.js","../src/features/jserrors/constants.js","../src/features/jserrors/index.js","../src/features/jserrors/aggregate/canonical-function-name.js","../src/features/jserrors/aggregate/cause-string.js","../src/features/jserrors/aggregate/compute-stack-trace.js","../src/features/jserrors/aggregate/format-stack-trace.js","../src/features/jserrors/aggregate/index.js","../src/features/jserrors/aggregate/internal-errors.js","../src/features/jserrors/aggregate/string-hash-code.js","../src/features/jserrors/instrument/index.js","../src/features/jserrors/shared/cast-error.js","../src/features/jserrors/shared/uncaught-error.js","../src/features/logging/constants.js","../src/features/logging/index.js","../src/features/logging/aggregate/index.js","../src/features/logging/instrument/index.js","../src/features/logging/shared/log.js","../src/features/logging/shared/utils.js","../src/features/metrics/constants.js","../src/features/metrics/index.js","../src/features/metrics/aggregate/framework-detection.js","../src/features/metrics/aggregate/harvest-metadata.js","../src/features/metrics/aggregate/index.js","../src/features/metrics/instrument/index.js","../src/features/page_action/constants.js","../src/features/page_action/index.js","../src/features/page_action/instrument/index.js","../src/features/page_view_event/constants.js","../src/features/page_view_event/index.js","../src/features/page_view_event/aggregate/index.js","../src/features/page_view_event/aggregate/initialized-features.js","../src/features/page_view_event/instrument/index.js","../src/features/page_view_timing/constants.js","../src/features/page_view_timing/index.js","../src/features/page_view_timing/aggregate/index.js","../src/features/page_view_timing/instrument/index.js","../src/features/session_replay/constants.js","../src/features/session_replay/index.js","../src/features/session_replay/aggregate/index.js","../src/features/session_replay/instrument/index.js","../src/features/session_replay/shared/recorder-events.js","../src/features/session_replay/shared/recorder.js","../src/features/session_replay/shared/stylesheet-evaluator.js","../src/features/session_replay/shared/utils.js","../src/features/session_trace/constants.js","../src/features/session_trace/index.js","../src/features/session_trace/aggregate/index.js","../src/features/session_trace/aggregate/trace/node.js","../src/features/session_trace/aggregate/trace/storage.js","../src/features/session_trace/aggregate/trace/utils.js","../src/features/session_trace/instrument/index.js","../src/features/soft_navigations/constants.js","../src/features/soft_navigations/index.js","../src/features/soft_navigations/aggregate/ajax-node.js","../src/features/soft_navigations/aggregate/bel-node.js","../src/features/soft_navigations/aggregate/index.js","../src/features/soft_navigations/aggregate/initial-page-load-interaction.js","../src/features/soft_navigations/aggregate/interaction.js","../src/features/soft_navigations/instrument/index.js","../src/features/utils/agent-session.js","../src/features/utils/aggregate-base.js","../src/features/utils/event-buffer.js","../src/features/utils/feature-base.js","../src/features/utils/feature-gates.js","../src/features/utils/instrument-base.js","../src/interfaces/registered-entity.js","../src/interfaces/registered-iframe-entity.js","../src/loaders/agent-base.js","../src/loaders/agent.js","../src/loaders/api-base.js","../src/loaders/browser-agent.js","../src/loaders/micro-agent-base.js","../src/loaders/micro-agent.js","../src/loaders/api/addPageAction.js","../src/loaders/api/addRelease.js","../src/loaders/api/addToTrace.js","../src/loaders/api/consent.js","../src/loaders/api/constants.js","../src/loaders/api/finished.js","../src/loaders/api/interaction-types.js","../src/loaders/api/interaction.js","../src/loaders/api/log.js","../src/loaders/api/measure.js","../src/loaders/api/noticeError.js","../src/loaders/api/pauseReplay.js","../src/loaders/api/recordCustomEvent.js","../src/loaders/api/recordReplay.js","../src/loaders/api/register-api-types.js","../src/loaders/api/register.js","../src/loaders/api/setApplicationVersion.js","../src/loaders/api/setCustomAttribute.js","../src/loaders/api/setErrorHandler.js","../src/loaders/api/setPageViewName.js","../src/loaders/api/setUserId.js","../src/loaders/api/sharedHandlers.js","../src/loaders/api/start.js","../src/loaders/api/topLevelCallers.js","../src/loaders/api/wrapLogger.js","../src/loaders/configure/configure.js","../src/loaders/configure/iframe-message-handler.js","../src/loaders/configure/nonce.js","../src/loaders/configure/public-path.js","../src/loaders/features/enabled-features.js","../src/loaders/features/featureDependencies.js","../src/loaders/features/features.js"],"version":"5.9.3"}
1
+ {"root":["../src/index.js","../src/cdn/experimental.js","../src/cdn/lite.js","../src/cdn/pro.js","../src/cdn/spa.js","../src/common/aggregate/aggregator.js","../src/common/aggregate/event-aggregator.js","../src/common/config/configurable.js","../src/common/config/info.js","../src/common/config/init-types.js","../src/common/config/init.js","../src/common/config/loader-config.js","../src/common/config/runtime.js","../src/common/constants/agent-constants.js","../src/common/constants/env.cdn.js","../src/common/constants/env.js","../src/common/constants/env.npm.js","../src/common/constants/events.js","../src/common/constants/iframe-constants.js","../src/common/constants/runtime.js","../src/common/constants/shared-channel.js","../src/common/deny-list/deny-list.js","../src/common/dispatch/global-event.js","../src/common/dom/iframe.js","../src/common/dom/query-selector.js","../src/common/dom/selector-path.js","../src/common/drain/drain.js","../src/common/event-emitter/contextual-ee.js","../src/common/event-emitter/event-context.js","../src/common/event-emitter/handle.js","../src/common/event-emitter/register-handler.js","../src/common/event-listener/event-listener-opts.js","../src/common/harvest/connector.js","../src/common/harvest/harvester.js","../src/common/harvest/send.js","../src/common/harvest/types.js","../src/common/ids/bundle-id.js","../src/common/ids/id.js","../src/common/ids/unique-id.js","../src/common/payloads/payloads.js","../src/common/serialize/bel-serializer.js","../src/common/session/constants.js","../src/common/session/session-entity.js","../src/common/session/session-key.js","../src/common/storage/local-storage.js","../src/common/timer/interaction-timer.js","../src/common/timer/timer.js","../src/common/timing/nav-timing.js","../src/common/timing/now.js","../src/common/timing/time-keeper.js","../src/common/unload/eol.js","../src/common/url/add-url.js","../src/common/url/canonicalize-url.js","../src/common/url/clean-url.js","../src/common/url/encode.js","../src/common/url/extract-url.js","../src/common/url/location.js","../src/common/url/parse-url.js","../src/common/url/protocol.js","../src/common/util/attribute-size.js","../src/common/util/browser-stack-matchers.js","../src/common/util/console.js","../src/common/util/data-size.js","../src/common/util/event-origin.js","../src/common/util/feature-flags.js","../src/common/util/get-or-set.js","../src/common/util/invoke.js","../src/common/util/monkey-patched.js","../src/common/util/obfuscate.js","../src/common/util/short-circuit.js","../src/common/util/stringify.js","../src/common/util/submit-data.js","../src/common/util/text.js","../src/common/util/traverse.js","../src/common/util/type-check.js","../src/common/util/webdriver-detection.js","../src/common/v2/constants.js","../src/common/v2/mfe-vitals.js","../src/common/v2/script-correlation.js","../src/common/v2/script-tracker-constants.js","../src/common/v2/script-tracker.js","../src/common/v2/timing-factory.js","../src/common/v2/utils.js","../src/common/vitals/constants.js","../src/common/vitals/cumulative-layout-shift.js","../src/common/vitals/first-contentful-paint.js","../src/common/vitals/first-paint.js","../src/common/vitals/interaction-to-next-paint.js","../src/common/vitals/largest-contentful-paint.js","../src/common/vitals/load-time.js","../src/common/vitals/time-to-first-byte.js","../src/common/vitals/vital-metric.js","../src/common/window/load.js","../src/common/window/nreum.js","../src/common/window/page-visibility.js","../src/common/wrap/wrap-events.js","../src/common/wrap/wrap-fetch.js","../src/common/wrap/wrap-function.js","../src/common/wrap/wrap-history.js","../src/common/wrap/wrap-logger.js","../src/common/wrap/wrap-websocket.js","../src/common/wrap/wrap-xhr.js","../src/features/ajax/constants.js","../src/features/ajax/index.js","../src/features/ajax/aggregate/gql.js","../src/features/ajax/aggregate/index.js","../src/features/ajax/instrument/distributed-tracing.js","../src/features/ajax/instrument/index.js","../src/features/ajax/instrument/response-size.js","../src/features/generic_events/constants.js","../src/features/generic_events/index.js","../src/features/generic_events/aggregate/index.js","../src/features/generic_events/aggregate/user-actions/aggregated-user-action.js","../src/features/generic_events/aggregate/user-actions/user-actions-aggregator.js","../src/features/generic_events/instrument/index.js","../src/features/jserrors/constants.js","../src/features/jserrors/index.js","../src/features/jserrors/aggregate/canonical-function-name.js","../src/features/jserrors/aggregate/cause-string.js","../src/features/jserrors/aggregate/compute-stack-trace.js","../src/features/jserrors/aggregate/format-stack-trace.js","../src/features/jserrors/aggregate/index.js","../src/features/jserrors/aggregate/internal-errors.js","../src/features/jserrors/aggregate/string-hash-code.js","../src/features/jserrors/instrument/index.js","../src/features/jserrors/shared/cast-error.js","../src/features/jserrors/shared/uncaught-error.js","../src/features/logging/constants.js","../src/features/logging/index.js","../src/features/logging/aggregate/index.js","../src/features/logging/instrument/index.js","../src/features/logging/shared/log.js","../src/features/logging/shared/utils.js","../src/features/metrics/constants.js","../src/features/metrics/index.js","../src/features/metrics/aggregate/framework-detection.js","../src/features/metrics/aggregate/harvest-metadata.js","../src/features/metrics/aggregate/index.js","../src/features/metrics/instrument/index.js","../src/features/page_action/constants.js","../src/features/page_action/index.js","../src/features/page_action/instrument/index.js","../src/features/page_view_event/constants.js","../src/features/page_view_event/index.js","../src/features/page_view_event/aggregate/index.js","../src/features/page_view_event/aggregate/initialized-features.js","../src/features/page_view_event/aggregate_v2/index.js","../src/features/page_view_event/instrument/index.js","../src/features/page_view_timing/constants.js","../src/features/page_view_timing/index.js","../src/features/page_view_timing/aggregate/index.js","../src/features/page_view_timing/instrument/index.js","../src/features/session_replay/constants.js","../src/features/session_replay/index.js","../src/features/session_replay/aggregate/index.js","../src/features/session_replay/instrument/index.js","../src/features/session_replay/shared/recorder-events.js","../src/features/session_replay/shared/recorder.js","../src/features/session_replay/shared/stylesheet-evaluator.js","../src/features/session_replay/shared/utils.js","../src/features/session_trace/constants.js","../src/features/session_trace/index.js","../src/features/session_trace/aggregate/index.js","../src/features/session_trace/aggregate/trace/node.js","../src/features/session_trace/aggregate/trace/storage.js","../src/features/session_trace/aggregate/trace/utils.js","../src/features/session_trace/instrument/index.js","../src/features/soft_navigations/constants.js","../src/features/soft_navigations/index.js","../src/features/soft_navigations/aggregate/ajax-node.js","../src/features/soft_navigations/aggregate/bel-node.js","../src/features/soft_navigations/aggregate/index.js","../src/features/soft_navigations/aggregate/initial-page-load-interaction.js","../src/features/soft_navigations/aggregate/interaction.js","../src/features/soft_navigations/instrument/index.js","../src/features/utils/agent-session.js","../src/features/utils/aggregate-base.js","../src/features/utils/event-buffer.js","../src/features/utils/feature-base.js","../src/features/utils/feature-gates.js","../src/features/utils/instrument-base.js","../src/interfaces/registered-entity.js","../src/interfaces/registered-iframe-entity.js","../src/loaders/agent-base.js","../src/loaders/agent.js","../src/loaders/api-base.js","../src/loaders/browser-agent.js","../src/loaders/micro-agent-base.js","../src/loaders/micro-agent.js","../src/loaders/api/addPageAction.js","../src/loaders/api/addRelease.js","../src/loaders/api/addToTrace.js","../src/loaders/api/consent.js","../src/loaders/api/constants.js","../src/loaders/api/finished.js","../src/loaders/api/interaction-types.js","../src/loaders/api/interaction.js","../src/loaders/api/log.js","../src/loaders/api/measure.js","../src/loaders/api/noticeError.js","../src/loaders/api/pauseReplay.js","../src/loaders/api/recordCustomEvent.js","../src/loaders/api/recordReplay.js","../src/loaders/api/register-api-types.js","../src/loaders/api/register.js","../src/loaders/api/setApplicationVersion.js","../src/loaders/api/setCustomAttribute.js","../src/loaders/api/setErrorHandler.js","../src/loaders/api/setPageViewName.js","../src/loaders/api/setUserId.js","../src/loaders/api/sharedHandlers.js","../src/loaders/api/start.js","../src/loaders/api/topLevelCallers.js","../src/loaders/api/wrapLogger.js","../src/loaders/configure/configure.js","../src/loaders/configure/iframe-message-handler.js","../src/loaders/configure/nonce.js","../src/loaders/configure/public-path.js","../src/loaders/features/enabled-features.js","../src/loaders/features/featureDependencies.js","../src/loaders/features/features.js"],"version":"5.9.3"}
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/common/config/runtime.js"],"names":[],"mappings":"AA6DO,gDAON"}
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/common/config/runtime.js"],"names":[],"mappings":"AAgEO,gDAON"}
@@ -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
  export function eventListenerOpts(useCapture: any, abortSignal: any): {
@@ -0,0 +1,6 @@
1
+ export class Connector {
2
+ constructor(agentRef: any);
3
+ makeConnectRequest(retryHeaders: any): boolean;
4
+ #private;
5
+ }
6
+ //# sourceMappingURL=connector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/connector.js"],"names":[],"mappings":"AAmBA;IAKE,2BAeC;IAED,+CAiBC;;CA6GF"}