@newrelic/browser-agent 1.301.0-rc.1 → 1.301.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/dist/cjs/common/config/init-types.js +1 -1
  2. package/dist/cjs/common/config/init.js +7 -1
  3. package/dist/cjs/common/config/runtime.js +1 -1
  4. package/dist/cjs/common/constants/agent-constants.js +11 -2
  5. package/dist/cjs/common/constants/env.cdn.js +1 -1
  6. package/dist/cjs/common/constants/env.npm.js +1 -1
  7. package/dist/cjs/common/drain/drain.js +1 -1
  8. package/dist/cjs/common/harvest/harvester.js +30 -39
  9. package/dist/cjs/common/util/mfe.js +45 -0
  10. package/dist/cjs/features/generic_events/aggregate/index.js +9 -8
  11. package/dist/cjs/features/generic_events/constants.js +3 -1
  12. package/dist/cjs/features/jserrors/aggregate/index.js +18 -17
  13. package/dist/cjs/features/logging/aggregate/index.js +19 -15
  14. package/dist/cjs/features/logging/shared/utils.js +3 -3
  15. package/dist/cjs/features/page_view_event/aggregate/index.js +3 -33
  16. package/dist/cjs/features/session_replay/aggregate/index.js +13 -13
  17. package/dist/cjs/features/session_replay/shared/recorder.js +3 -2
  18. package/dist/cjs/features/session_trace/aggregate/index.js +0 -2
  19. package/dist/cjs/features/soft_navigations/aggregate/index.js +1 -2
  20. package/dist/cjs/features/utils/aggregate-base.js +45 -47
  21. package/dist/cjs/loaders/api/addPageAction.js +2 -2
  22. package/dist/cjs/loaders/api/log.js +2 -2
  23. package/dist/cjs/loaders/api/noticeError.js +2 -2
  24. package/dist/cjs/loaders/api/register-api-types.js +5 -5
  25. package/dist/cjs/loaders/api/register.js +80 -97
  26. package/dist/esm/common/config/init-types.js +1 -1
  27. package/dist/esm/common/config/init.js +7 -1
  28. package/dist/esm/common/config/runtime.js +1 -1
  29. package/dist/esm/common/constants/agent-constants.js +9 -1
  30. package/dist/esm/common/constants/env.cdn.js +1 -1
  31. package/dist/esm/common/constants/env.npm.js +1 -1
  32. package/dist/esm/common/drain/drain.js +1 -1
  33. package/dist/esm/common/harvest/harvester.js +30 -39
  34. package/dist/esm/common/util/mfe.js +38 -0
  35. package/dist/esm/features/generic_events/aggregate/index.js +9 -8
  36. package/dist/esm/features/generic_events/constants.js +3 -1
  37. package/dist/esm/features/jserrors/aggregate/index.js +18 -17
  38. package/dist/esm/features/logging/aggregate/index.js +19 -15
  39. package/dist/esm/features/logging/shared/utils.js +3 -3
  40. package/dist/esm/features/page_view_event/aggregate/index.js +3 -33
  41. package/dist/esm/features/session_replay/aggregate/index.js +13 -13
  42. package/dist/esm/features/session_replay/shared/recorder.js +3 -2
  43. package/dist/esm/features/session_trace/aggregate/index.js +0 -2
  44. package/dist/esm/features/soft_navigations/aggregate/index.js +1 -2
  45. package/dist/esm/features/utils/aggregate-base.js +46 -48
  46. package/dist/esm/loaders/api/addPageAction.js +2 -2
  47. package/dist/esm/loaders/api/log.js +2 -2
  48. package/dist/esm/loaders/api/noticeError.js +2 -2
  49. package/dist/esm/loaders/api/register-api-types.js +5 -5
  50. package/dist/esm/loaders/api/register.js +80 -97
  51. package/dist/tsconfig.tsbuildinfo +1 -1
  52. package/dist/types/common/config/init-types.d.ts +4 -1
  53. package/dist/types/common/config/init-types.d.ts.map +1 -1
  54. package/dist/types/common/config/init.d.ts.map +1 -1
  55. package/dist/types/common/constants/agent-constants.d.ts +7 -4
  56. package/dist/types/common/constants/agent-constants.d.ts.map +1 -1
  57. package/dist/types/common/harvest/harvester.d.ts +2 -2
  58. package/dist/types/common/harvest/harvester.d.ts.map +1 -1
  59. package/dist/types/common/util/mfe.d.ts +20 -0
  60. package/dist/types/common/util/mfe.d.ts.map +1 -0
  61. package/dist/types/features/generic_events/aggregate/index.d.ts +2 -2
  62. package/dist/types/features/generic_events/aggregate/index.d.ts.map +1 -1
  63. package/dist/types/features/generic_events/constants.d.ts +1 -0
  64. package/dist/types/features/jserrors/aggregate/index.d.ts +3 -3
  65. package/dist/types/features/jserrors/aggregate/index.d.ts.map +1 -1
  66. package/dist/types/features/logging/aggregate/index.d.ts +3 -3
  67. package/dist/types/features/logging/aggregate/index.d.ts.map +1 -1
  68. package/dist/types/features/logging/shared/utils.d.ts +2 -2
  69. package/dist/types/features/logging/shared/utils.d.ts.map +1 -1
  70. package/dist/types/features/page_view_event/aggregate/index.d.ts +2 -4
  71. package/dist/types/features/page_view_event/aggregate/index.d.ts.map +1 -1
  72. package/dist/types/features/session_replay/aggregate/index.d.ts +13 -4
  73. package/dist/types/features/session_replay/aggregate/index.d.ts.map +1 -1
  74. package/dist/types/features/session_replay/shared/recorder.d.ts +1 -0
  75. package/dist/types/features/session_replay/shared/recorder.d.ts.map +1 -1
  76. package/dist/types/features/session_trace/aggregate/index.d.ts.map +1 -1
  77. package/dist/types/features/soft_navigations/aggregate/index.d.ts.map +1 -1
  78. package/dist/types/features/utils/aggregate-base.d.ts +13 -5
  79. package/dist/types/features/utils/aggregate-base.d.ts.map +1 -1
  80. package/dist/types/loaders/api/addPageAction.d.ts +1 -1
  81. package/dist/types/loaders/api/addPageAction.d.ts.map +1 -1
  82. package/dist/types/loaders/api/log.d.ts +1 -1
  83. package/dist/types/loaders/api/log.d.ts.map +1 -1
  84. package/dist/types/loaders/api/noticeError.d.ts +1 -1
  85. package/dist/types/loaders/api/noticeError.d.ts.map +1 -1
  86. package/dist/types/loaders/api/register-api-types.d.ts +4 -4
  87. package/dist/types/loaders/api/register-api-types.d.ts.map +1 -1
  88. package/dist/types/loaders/api/register.d.ts +8 -1
  89. package/dist/types/loaders/api/register.d.ts.map +1 -1
  90. package/package.json +1 -1
  91. package/src/common/config/init-types.js +1 -1
  92. package/src/common/config/init.js +3 -1
  93. package/src/common/config/runtime.js +1 -1
  94. package/src/common/constants/agent-constants.js +10 -0
  95. package/src/common/drain/drain.js +1 -1
  96. package/src/common/harvest/harvester.js +27 -32
  97. package/src/common/util/mfe.js +35 -0
  98. package/src/features/generic_events/aggregate/index.js +9 -8
  99. package/src/features/generic_events/constants.js +3 -1
  100. package/src/features/jserrors/aggregate/index.js +17 -17
  101. package/src/features/logging/aggregate/index.js +20 -13
  102. package/src/features/logging/shared/utils.js +3 -3
  103. package/src/features/page_view_event/aggregate/index.js +3 -28
  104. package/src/features/session_replay/aggregate/index.js +12 -10
  105. package/src/features/session_replay/shared/recorder.js +3 -2
  106. package/src/features/session_trace/aggregate/index.js +0 -2
  107. package/src/features/soft_navigations/aggregate/index.js +1 -2
  108. package/src/features/utils/aggregate-base.js +47 -42
  109. package/src/loaders/api/addPageAction.js +2 -2
  110. package/src/loaders/api/log.js +2 -2
  111. package/src/loaders/api/noticeError.js +2 -2
  112. package/src/loaders/api/register-api-types.js +5 -5
  113. package/src/loaders/api/register.js +62 -89
  114. package/dist/cjs/common/util/target.js +0 -34
  115. package/dist/cjs/features/utils/entity-manager.js +0 -46
  116. package/dist/cjs/features/utils/event-store-manager.js +0 -174
  117. package/dist/cjs/loaders/api/register-api.js +0 -165
  118. package/dist/esm/common/util/target.js +0 -27
  119. package/dist/esm/features/utils/entity-manager.js +0 -39
  120. package/dist/esm/features/utils/event-store-manager.js +0 -166
  121. package/dist/esm/loaders/api/register-api.js +0 -159
  122. package/dist/types/common/util/target.d.ts +0 -18
  123. package/dist/types/common/util/target.d.ts.map +0 -1
  124. package/dist/types/features/utils/entity-manager.d.ts +0 -11
  125. package/dist/types/features/utils/entity-manager.d.ts.map +0 -1
  126. package/dist/types/features/utils/event-store-manager.d.ts +0 -85
  127. package/dist/types/features/utils/event-store-manager.d.ts.map +0 -1
  128. package/dist/types/loaders/api/register-api.d.ts +0 -14
  129. package/dist/types/loaders/api/register-api.d.ts.map +0 -1
  130. package/src/common/util/target.js +0 -27
  131. package/src/features/utils/entity-manager.js +0 -45
  132. package/src/features/utils/event-store-manager.js +0 -165
  133. package/src/loaders/api/register-api.js +0 -152
@@ -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 { isContainerAgentTarget, isValidTarget } from '../../common/util/target';
7
+ import { isValidMFETarget } from '../../common/util/mfe';
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';
@@ -13,6 +13,7 @@ import { REGISTER } from './constants';
13
13
  import { log } from './log';
14
14
  import { addPageAction } from './addPageAction';
15
15
  import { noticeError } from './noticeError';
16
+ import { single } from '../../common/util/invoke';
16
17
 
17
18
  /**
18
19
  * @typedef {import('./register-api-types').RegisterAPI} RegisterAPI
@@ -35,138 +36,120 @@ export function setupRegisterAPI(agent) {
35
36
  * @param {Object} agentRef the reference to the base agent instance
36
37
  * @param {Object} handlers the shared handlers to be used by both the base agent's API and the external target's API
37
38
  * @param {Object} target the target information to be used by the external target's API to send data to the correct location
39
+ * @param {string} [target.licenseKey] the license key of the target to report data to
40
+ * @param {string} target.id the entity ID of the target to report data to
41
+ * @param {string} target.name the entity name of the target to report data to
38
42
  * @returns {RegisterAPI} the api object to be returned from the register api method
39
43
  */
40
44
  export function buildRegisterApi(agentRef, target) {
41
45
  const attrs = {};
42
46
  warn(54, 'newrelic.register');
47
+ target ||= {};
48
+ target.licenseKey ||= agentRef.info.licenseKey; // will inherit the license key from the container agent if not provided for brevity. A future state may dictate that we need different license keys to do different things.
49
+ target.blocked = false;
43
50
 
44
- /** @type {Function|undefined} a function that is set and reports when APIs are triggered -- warns the customer of the invalid state */
45
- let invalidApiResponse;
51
+ /** @type {Function} a function that is set and reports when APIs are triggered -- warns the customer of the invalid state */
52
+ let invalidApiResponse = () => {};
53
+ /** @type {Array} the array of registered target APIs */
54
+ const registeredEntities = agentRef.runtime.registeredEntities;
55
+
56
+ /** if we have already registered this target, go ahead and re-use it */
57
+ const preregisteredEntity = registeredEntities.find(({
58
+ metadata: {
59
+ target: {
60
+ id,
61
+ name
62
+ }
63
+ }
64
+ }) => id === target.id);
65
+ if (preregisteredEntity) {
66
+ if (preregisteredEntity.metadata.target.name !== target.name) preregisteredEntity.metadata.target.name = target.name;
67
+ return preregisteredEntity;
68
+ }
46
69
 
47
70
  /**
48
- * A promise that indicates when all needed connections for the registered child to be ready to report data
49
- * 1. The main agent to be ready (made a RUM call and got its entity guid)
50
- * 2. The child to be registered with the main agent (made its own RUM call and got its entity guid)
51
- * @type {Promise<RegisterAPI>}
52
- */
53
- let _connected;
54
- if (!agentRef.init.api.allow_registered_children) invalidApiResponse = () => warn(55);
55
- if (!target || !isValidTarget(target)) invalidApiResponse = () => warn(48, target);
71
+ * Block the API, and supply a warning function to display a message to end users
72
+ * @param {Function} warning
73
+ */
74
+ const block = warning => {
75
+ target.blocked = true;
76
+ invalidApiResponse = warning;
77
+ };
78
+
79
+ /** primary cases that can block the register API from working at init time */
80
+ if (!agentRef.init.api.allow_registered_children) block(single(() => warn(55)));
81
+ if (!isValidMFETarget(target)) block(single(() => warn(48, target)));
56
82
 
57
83
  /** @type {RegisterAPI} */
58
84
  const api = {
59
- addPageAction: (name, attributes = {}) => {
60
- report(addPageAction, [name, {
85
+ addPageAction: (name, attributes = {}) => report(addPageAction, [name, {
86
+ ...attrs,
87
+ ...attributes
88
+ }, agentRef], target),
89
+ log: (message, options = {}) => report(log, [message, {
90
+ ...options,
91
+ customAttributes: {
61
92
  ...attrs,
62
- ...attributes
63
- }, agentRef], target);
64
- },
65
- log: (message, options = {}) => {
66
- report(log, [message, {
67
- ...options,
68
- customAttributes: {
69
- ...attrs,
70
- ...(options.customAttributes || {})
71
- }
72
- }, agentRef], target);
73
- },
74
- noticeError: (error, attributes = {}) => {
75
- report(noticeError, [error, {
76
- ...attrs,
77
- ...attributes
78
- }, agentRef], target);
79
- },
80
- setApplicationVersion: value => {
81
- attrs['application.version'] = value;
82
- },
83
- setCustomAttribute: (key, value) => {
84
- attrs[key] = value;
85
- },
86
- setUserId: value => {
87
- attrs['enduser.id'] = value;
88
- },
93
+ ...(options.customAttributes || {})
94
+ }
95
+ }, agentRef], target),
96
+ noticeError: (error, attributes = {}) => report(noticeError, [error, {
97
+ ...attrs,
98
+ ...attributes
99
+ }, agentRef], target),
100
+ setApplicationVersion: value => setLocalValue('application.version', value),
101
+ setCustomAttribute: (key, value) => setLocalValue(key, value),
102
+ setUserId: value => setLocalValue('enduser.id', value),
89
103
  /** metadata */
90
104
  metadata: {
91
105
  customAttributes: attrs,
92
- target,
93
- /** set in a getter so that later access of the Promise is not polluted before customer is allowed to set a catch block */
94
- get connected() {
95
- return _connected || Promise.reject(new Error('Failed to connect'));
96
- }
106
+ target
97
107
  }
98
108
  };
99
- if (invalidApiResponse) {
100
- invalidApiResponse();
101
- } else {
102
- _connected = new Promise((resolve, reject) => {
103
- try {
104
- const entityManager = agentRef.runtime?.entityManager;
105
- /** check if main agent already has main agent entity guid */
106
- let mainAgentReady = !!entityManager?.get().entityGuid;
107
- /** check if registered target already has entity guid */
108
- let registeredEntityGuid = entityManager?.getEntityGuidFor(target.licenseKey, target.applicationID);
109
- let registrationReady = !!registeredEntityGuid;
110
-
111
- /** check if we can just resolve immediately without making another connect call */
112
- if (mainAgentReady && registrationReady) {
113
- target.entityGuid = registeredEntityGuid;
114
- resolve(api);
115
- } else {
116
- /** we need to make a new connection call since we dont already have a registered entity for this call */
117
109
 
118
- /** if the connect callback doesnt resolve in 15 seconds... reject */
119
- const timeout = setTimeout(() => reject(new Error('Failed to connect - Timeout')), 15000);
110
+ /**
111
+ * Check if the API is blocked and emit a warning message describing the blockage
112
+ * @returns {boolean}
113
+ */
114
+ const isBlocked = () => {
115
+ if (target.blocked) invalidApiResponse();
116
+ return target.blocked;
117
+ };
120
118
 
121
- // tell the main agent to send a rum call for this target
122
- // when the rum call resolves, it will emit an "entity-added" event, see below
123
- agentRef.ee.emit('api-send-rum', [attrs, target]);
119
+ /** only allow registered APIs to be tracked in the agent runtime */
120
+ if (!isBlocked()) registeredEntities.push(api);
124
121
 
125
- // wait for entity events to emit to see when main agent and/or API registration is ready
126
- agentRef.ee.on('entity-added', entityEventHandler);
127
- function entityEventHandler(entity) {
128
- if (isContainerAgentTarget(entity, agentRef)) mainAgentReady ||= true;else {
129
- if (target.licenseKey === entity.licenseKey && target.applicationID === entity.applicationID) {
130
- registrationReady = true;
131
- target.entityGuid = entity.entityGuid;
132
- }
133
- }
134
- if (mainAgentReady && registrationReady) {
135
- clearTimeout(timeout);
136
- // unsubscribe from the event emitter
137
- agentRef.ee.removeEventListener('entity-added', entityEventHandler);
138
- resolve(api);
139
- }
140
- }
141
- }
142
- } catch (err) {
143
- reject(err);
144
- }
145
- });
146
- }
122
+ /**
123
+ * Sets a value local to the registered API attrs. Will do nothing if APIs are deregistered.
124
+ * @param {string} key The attribute key
125
+ * @param {*} value the attribute value
126
+ * @returns {void}
127
+ */
128
+ const setLocalValue = (key, value) => {
129
+ if (isBlocked()) return;
130
+ attrs[key] = value;
131
+ };
147
132
 
148
133
  /**
149
134
  * The reporter method that will be used to report the data to the container agent's API method. If invalid, will log a warning and not execute.
150
135
  * If the api.duplicate_registered_data configuration value is set to true, the data will be reported to BOTH the container and the external target
151
136
  * @param {*} methodToCall the container agent's API method to call
152
137
  * @param {*} args the arguments to supply to the container agent's API method
153
- * @param {string} targetEntityGuid the target entity guid, which looks up the target to report the data to from the entity manager. If undefined, will report to the container agent's target.
138
+ * @param {string} target the target to report the data to. If undefined, will report to the container agent's target.
154
139
  * @returns
155
140
  */
156
- const report = async (methodToCall, args, target) => {
157
- if (invalidApiResponse) return invalidApiResponse();
141
+ const report = (methodToCall, args, target) => {
142
+ if (isBlocked()) return;
158
143
  /** set the timestamp before the async part of waiting for the rum response for better accuracy */
159
144
  const timestamp = now();
160
145
  handle(SUPPORTABILITY_METRIC_CHANNEL, ["API/register/".concat(methodToCall.name, "/called")], undefined, FEATURE_NAMES.metrics, agentRef.ee);
161
146
  try {
162
- await _connected;
163
- // target should be decorated with entityGuid by the rum resp at this point
164
147
  const shouldDuplicate = agentRef.init.api.duplicate_registered_data;
165
- if (shouldDuplicate === true || Array.isArray(shouldDuplicate) && shouldDuplicate.includes(target.entityGuid)) {
148
+ if (shouldDuplicate === true || Array.isArray(shouldDuplicate)) {
166
149
  // also report to container by providing undefined target
167
150
  methodToCall(...args, undefined, timestamp);
168
151
  }
169
- methodToCall(...args, target.entityGuid, timestamp); // always report to target
152
+ return methodToCall(...args, target, timestamp); // always report to target
170
153
  } catch (err) {
171
154
  warn(50, err);
172
155
  }
@@ -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/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/types.js","../src/common/ids/bundle-id.js","../src/common/ids/id.js","../src/common/ids/unique-id.js","../src/common/serialize/bel-serializer.js","../src/common/session/constants.js","../src/common/session/session-entity.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/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/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/stringify.js","../src/common/util/submit-data.js","../src/common/util/target.js","../src/common/util/text.js","../src/common/util/traverse.js","../src/common/util/type-check.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/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-jsonp.js","../src/common/wrap/wrap-logger.js","../src/common/wrap/wrap-mutation.js","../src/common/wrap/wrap-promise.js","../src/common/wrap/wrap-timer.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/aggregate/websocket-detection.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/spa/constants.js","../src/features/spa/index.js","../src/features/spa/aggregate/index.js","../src/features/spa/aggregate/interaction-node.js","../src/features/spa/aggregate/interaction.js","../src/features/spa/aggregate/serializer.js","../src/features/spa/instrument/index.js","../src/features/utils/agent-session.js","../src/features/utils/aggregate-base.js","../src/features/utils/entity-manager.js","../src/features/utils/event-buffer.js","../src/features/utils/event-store-manager.js","../src/features/utils/feature-base.js","../src/features/utils/feature-gates.js","../src/features/utils/instrument-base.js","../src/features/utils/nr1-debugger.js","../src/interfaces/registered-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/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-api.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/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/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/types.js","../src/common/ids/bundle-id.js","../src/common/ids/id.js","../src/common/ids/unique-id.js","../src/common/serialize/bel-serializer.js","../src/common/session/constants.js","../src/common/session/session-entity.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/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/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/mfe.js","../src/common/util/monkey-patched.js","../src/common/util/obfuscate.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/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/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-jsonp.js","../src/common/wrap/wrap-logger.js","../src/common/wrap/wrap-mutation.js","../src/common/wrap/wrap-promise.js","../src/common/wrap/wrap-timer.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/aggregate/websocket-detection.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/spa/constants.js","../src/features/spa/index.js","../src/features/spa/aggregate/index.js","../src/features/spa/aggregate/interaction-node.js","../src/features/spa/aggregate/interaction.js","../src/features/spa/aggregate/serializer.js","../src/features/spa/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/features/utils/nr1-debugger.js","../src/interfaces/registered-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/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/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"}
@@ -92,7 +92,10 @@ export type Init = {
92
92
  /**
93
93
  * - Array of regexp and corresponding replacement patterns for obfuscating data.
94
94
  */
95
- obfuscate?: Object[] | undefined;
95
+ obfuscate?: {
96
+ regex: RegExp | string;
97
+ replacement: string;
98
+ }[] | undefined;
96
99
  page_action?: {
97
100
  /**
98
101
  * - Must be true to allow PageAction events to be captured.
@@ -1 +1 @@
1
- {"version":3,"file":"init-types.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init-types.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"init-types.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init-types.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAqCsB,MAAM,GAAG,MAAM;qBAAe,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init.js"],"names":[],"mappings":"AA4IO,0CAEN;mBAnIY,OAAO,cAAc,EAAE,IAAI"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init.js"],"names":[],"mappings":"AA8IO,0CAEN;mBArIY,OAAO,cAAc,EAAE,IAAI"}
@@ -1,9 +1,12 @@
1
- /**
2
- * Copyright 2020-2025 New Relic, Inc. All rights reserved.
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
1
  export const IDEAL_PAYLOAD_SIZE: 16000;
6
2
  export const MAX_PAYLOAD_SIZE: 1000000;
7
3
  export const DEFAULT_KEY: "NR_CONTAINER_AGENT";
8
4
  export const SESSION_ERROR: "SESSION_ERROR";
5
+ export const SUPPORTS_REGISTERED_ENTITIES: {
6
+ [FEATURE_NAMES.logging]: boolean;
7
+ [FEATURE_NAMES.genericEvents]: boolean;
8
+ [FEATURE_NAMES.jserrors]: boolean;
9
+ [FEATURE_NAMES.ajax]: boolean;
10
+ };
11
+ import { FEATURE_NAMES } from '../../loaders/features/features';
9
12
  //# sourceMappingURL=agent-constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-constants.d.ts","sourceRoot":"","sources":["../../../../src/common/constants/agent-constants.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,iCAAkC,KAAK,CAAA;AACvC,+BAAgC,OAAO,CAAA;AACvC,0BAA2B,oBAAoB,CAAA;AAC/C,4BAA6B,eAAe,CAAA"}
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"}
@@ -3,15 +3,15 @@
3
3
  * @param {NetworkSendSpec} param0 Specification for sending data
4
4
  * @returns {boolean} True if a network call was made. Note that this does not mean or guarantee that it was successful.
5
5
  */
6
- export function send(agentRef: any, { endpoint, targetApp, payload, localOpts, submitMethod, cbFinished, raw, featureName }: {
6
+ export function send(agentRef: any, { endpoint, payload, localOpts, submitMethod, cbFinished, raw, featureName, endpointVersion }: {
7
7
  endpoint: any;
8
- targetApp: any;
9
8
  payload: any;
10
9
  localOpts?: {} | undefined;
11
10
  submitMethod: any;
12
11
  cbFinished: any;
13
12
  raw: any;
14
13
  featureName: any;
14
+ endpointVersion?: number | undefined;
15
15
  }): boolean;
16
16
  export class Harvester {
17
17
  constructor(agentRef: any);
@@ -1 +1 @@
1
- {"version":3,"file":"harvester.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/harvester.js"],"names":[],"mappings":"AA6GA;;;;IAII;AACJ;;;;;;;;;IAFc,OAAO,CA0HpB;AAnND;IAIE,2BAUC;IAZD,6BAA0B;IAGxB,cAAwB;IAW1B,wCASC;IAED;;;;;OAKG;IACH,iCAJW,MAAM,cACN,MAAM,GACJ,OAAO,CA+CnB;;CACF;8BAGY,OAAO,YAAY,EAAE,eAAe"}
1
+ {"version":3,"file":"harvester.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/harvester.js"],"names":[],"mappings":"AAyGA;;;;IAII;AACJ;;;;;;;;;IAFc,OAAO,CAyHpB;AA9MD;IAIE,2BAUC;IAZD,6BAA0B;IAGxB,cAAwB;IAW1B,wCASC;IAED;;;;;OAKG;IACH,iCAJW,MAAM,cACN,MAAM,GACJ,OAAO,CA2CnB;;CACF;8BAGY,OAAO,YAAY,EAAE,eAAe"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright 2020-2025 New Relic, Inc. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ /**
6
+ * @param {Object} [target] - the target to be validated
7
+ * @returns {boolean}
8
+ */
9
+ export function isValidMFETarget(target?: Object): boolean;
10
+ /**
11
+ * When given a valid target, returns an object with the MFE payload attributes. Returns an empty object otherwise.
12
+ * @param {Object} [target] the registered target
13
+ * @param {AggregateInstance} [aggregateInstance] the aggregate instance calling the method
14
+ * @returns {{'mfe.id': *, 'mfe.name': String}|{}} returns an empty object if args are not supplied or the aggregate instance is not supporting version 2
15
+ */
16
+ export function getVersion2Attributes(target?: Object, aggregateInstance?: AggregateInstance): {
17
+ "mfe.id": any;
18
+ "mfe.name": string;
19
+ } | {};
20
+ //# sourceMappingURL=mfe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mfe.d.ts","sourceRoot":"","sources":["../../../../src/common/util/mfe.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,0CAHW,MAAM,GACJ,OAAO,CAInB;AAED;;;;;GAKG;AACH,+CAJW,MAAM,sBACN,iBAAiB,GACf;IAAC,QAAQ,EAAE,GAAC,CAAC;IAAC,UAAU,SAAQ;CAAC,GAAC,EAAE,CAiBhD"}
@@ -12,10 +12,10 @@ export class Aggregate extends AggregateBase {
12
12
  * * sessionTraceId: set by the `ptid=` query param
13
13
  * * userAgent*: set by the userAgent header
14
14
  * @param {object=} obj the event object for storing in the event buffer
15
- * @param {string=} targetEntityGuid the target entity guid for the event to scope buffering and harvesting. Defaults to agent config if undefined
15
+ * @param {string=} target the target metadata for the event to scope buffering and harvesting. Defaults to container agent config if undefined
16
16
  * @returns void
17
17
  */
18
- addEvent(obj?: object | undefined, targetEntityGuid?: string | undefined): void;
18
+ addEvent(obj?: object | undefined, target?: string | undefined): void;
19
19
  serializer(eventBuffer: any): Object;
20
20
  queryStringsBuilder(): {
21
21
  ua: any;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/generic_events/aggregate/index.js"],"names":[],"mappings":"AAiBA;IACE,2BAAiC;IAGjC,2BAkOC;IAhOC,gCAAkG;IAmOpG;;;;;;;;;;;;OAYG;IACH,eAJW,MAAM,YAAC,qBACP,MAAM,YAAC,QAiCjB;IAED,qCAEC;IAED;;;MAEC;IAED,gCAEC;;CAkBF;8BA3T6B,4BAA4B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/generic_events/aggregate/index.js"],"names":[],"mappings":"AAkBA;IACE,2BAAiC;IAGjC,2BAgOC;IA9NC,gCAAkG;IAiOpG;;;;;;;;;;;;OAYG;IACH,eAJW,MAAM,YAAC,WACP,MAAM,YAAC,QAmCjB;IAED,qCAEC;IAED;;;MAEC;IAED,gCAEC;;CAkBF;8BA5T6B,4BAA4B"}
@@ -7,5 +7,6 @@ export const FRUSTRATION_TIMEOUT_MS: 2000;
7
7
  export const RESERVED_EVENT_TYPES: string[];
8
8
  export namespace FEATURE_FLAGS {
9
9
  let RESOURCES: string;
10
+ let REGISTER: string;
10
11
  }
11
12
  //# sourceMappingURL=constants.d.ts.map
@@ -33,14 +33,14 @@ export class Aggregate extends AggregateBase {
33
33
  * @param {object=} target the target to buffer and harvest to, if undefined the default configuration target is used
34
34
  * @returns
35
35
  */
36
- storeError(err: Error | UncaughtError, time: number, internal?: boolean | undefined, customAttributes?: object | undefined, hasReplay?: boolean | undefined, swallowReason?: string | undefined, targetEntityGuid: any): void;
36
+ storeError(err: Error | UncaughtError, time: number, internal?: boolean | undefined, customAttributes?: object | undefined, hasReplay?: boolean | undefined, swallowReason?: string | undefined, target?: object | undefined): void;
37
37
  /**
38
38
  * If the event lacks an entityGuid (the default behavior), the main agent should capture the data. If the data is assigned to a sub-entity target
39
39
  * the main agent should not capture events unless it is configured to do so.
40
- * @param {string} entityGuid - the context object for the event
40
+ * @param {string} target - the context object for the event
41
41
  * @returns {boolean} - whether the main agent should capture the event to its internal target
42
42
  */
43
- shouldAllowMainAgentToCapture(entityGuid: string): boolean;
43
+ shouldAllowMainAgentToCapture(target: string): boolean;
44
44
  onInteractionDone(interaction: any, wasSaved: any): void;
45
45
  onSoftNavNotification(interactionId: any, wasFinished: any, softNavAttrs: any, interactionEndTime: any): void;
46
46
  #private;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/jserrors/aggregate/index.js"],"names":[],"mappings":"AAyBA;;GAEG;AAEH;IACE,2BAAiC;IACjC,2BA4BC;IAzBC,kBAAuB;IACvB,eAAoB;IACpB,qBAA0B;IAC1B,2BAAgC;IAChC,qBAAwB;IAuB1B,oDAEC;IAED;;;MAcC;IAED;;;;;;OAMG;IACH,qCAHW,SAAS,GACP,MAAM,CAgBlB;IAED;;;;;;;;;;OAUG;IACH,gBATW,KAAK,GAAC,aAAa,QACnB,MAAM,aACN,OAAO,YAAC,qBACR,MAAM,YAAC,cACP,OAAO,YAAC,kBACR,MAAM,YAAC,+BAiHjB;IA4BD;;;;;MAKE;IACF,0CAHU,MAAM,GACJ,OAAO,CAIlB;IAGD,yDA6BC;IAED,8GAWC;;CACF;wBAxRY,OAAO,0BAA0B,EAAE,SAAS;8BAT3B,4BAA4B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/jserrors/aggregate/index.js"],"names":[],"mappings":"AAwBA;;GAEG;AAEH;IACE,2BAAiC;IACjC,2BA4BC;IAvBC,kBAAuB;IACvB,eAAoB;IACpB,qBAA0B;IAC1B,2BAAgC;IAChC,qBAAwB;IAqB1B,oDAEC;IAED;;;MAcC;IAED;;;;;;OAMG;IACH,qCAHW,SAAS,GACP,MAAM,CAgBlB;IAED;;;;;;;;;;OAUG;IACH,gBATW,KAAK,GAAC,aAAa,QACnB,MAAM,aACN,OAAO,YAAC,qBACR,MAAM,YAAC,cACP,OAAO,YAAC,kBACR,MAAM,YAAC,WACP,MAAM,YAAC,QA8GjB;IA+BD;;;;;MAKE;IACF,sCAHU,MAAM,GACJ,OAAO,CAIlB;IAGD,yDA6BC;IAED,8GAWC;;CACF;wBAzRY,OAAO,0BAA0B,EAAE,SAAS;8BAR3B,4BAA4B"}
@@ -4,8 +4,8 @@ export class Aggregate extends AggregateBase {
4
4
  isSessionTrackingEnabled: any;
5
5
  loggingMode: any;
6
6
  updateLoggingMode(loggingMode: any): void;
7
- handleLog(timestamp: any, message: any, attributes: {} | undefined, level: string | undefined, targetEntityGuid: any): void;
8
- serializer(eventBuffer: any, targetEntityGuid: any): {
7
+ handleLog(timestamp: any, message: any, attributes: {} | undefined, level: string | undefined, target: any): void;
8
+ serializer(eventBuffer: any): {
9
9
  common: {
10
10
  /** Attributes in the `common` section are added to `all` logs generated in the payload */
11
11
  attributes: any;
@@ -13,7 +13,7 @@ export class Aggregate extends AggregateBase {
13
13
  /** logs section contains individual unique log entries */
14
14
  logs: Object;
15
15
  }[];
16
- queryStringsBuilder(_: any, targetEntityGuid: any): {
16
+ queryStringsBuilder(): {
17
17
  browser_monitoring_key: any;
18
18
  };
19
19
  /** Abort the feature, once aborted it will not resume */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/logging/aggregate/index.js"],"names":[],"mappings":"AAiBA;IACE,2BAAiC;IACjC,2BAqCC;IAnCC,8BAAmG;IAY5F,iBAAmC;IAyB5C,0CAKC;IAED,4HAsCC;IAED;;YAKM,0FAA0F;;;QAmB5F,0DAA0D;;QAM7D;IAED;;MAGC;IAED,yDAAyD;IACzD,yBASC;IAED,yCAIC;CACF;8BAxJ6B,4BAA4B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/logging/aggregate/index.js"],"names":[],"mappings":"AAiBA;IACE,2BAAiC;IACjC,2BAsCC;IApCC,8BAAmG;IAc5F,iBAAmC;IAwB5C,0CAKC;IAED,kHA4CC;IAED;;YAIM,0FAA0F;;;QAqB5F,0DAA0D;;QAM7D;IAED;;MAEC;IAED,yDAAyD;IACzD,yBASC;IAED,yCAIC;CACF;8BA/J6B,4BAA4B"}
@@ -3,11 +3,11 @@
3
3
  * @param {string} message - the log message string
4
4
  * @param {{[key: string]: *}} customAttributes - The log's custom attributes if any
5
5
  * @param {enum} level - the log level enum
6
- * @param {object=} targetEntityGuid - the optional target entity guid provided by an api call
6
+ * @param {object=} target - the optional target provided by an api call
7
7
  */
8
8
  export function bufferLog(ee: ContextualEE, message: string, customAttributes?: {
9
9
  [key: string]: any;
10
- }, level?: enum, targetEntityGuid?: object | undefined, timestamp?: number): void;
10
+ }, level?: enum, target?: object | undefined, timestamp?: number): void;
11
11
  /**
12
12
  * Checks if a supplied log level is acceptable for use in generating a log event
13
13
  * @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;;;;;;KAMK;AACL,8BANa,YAAY,WACZ,MAAM,qBACN;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAC,CAAA;CAAC,UAClB,IAAI,qBACJ,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;;;;;;KAMK;AACL,8BANa,YAAY,WACZ,MAAM,qBACN;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAC,CAAA;CAAC,UAClB,IAAI,WACJ,MAAM,YAAC,4BAKnB;AAED;;;;GAIG;AACH,uCAHW,MAAM,GACJ,OAAO,CAKnB"}
@@ -8,17 +8,15 @@ export class Aggregate extends AggregateBase {
8
8
  *
9
9
  * @param {Function} cb A function to run once the RUM call has finished - Defaults to activateFeatures
10
10
  * @param {*} customAttributes custom attributes to attach to the RUM call - Defaults to info.js
11
- * @param {*} target The target to harvest to - Since we will not know the entityGuid before harvesting, this must be an object directly supplied from the info object or API, not an entityGuid string for lookup with the entityManager - Defaults to { licenseKey: this.agentRef.info.licenseKey, applicationID: this.agentRef.info.applicationID }
11
+ * @param {*} target The target to harvest to
12
12
  */
13
13
  sendRum(customAttributes?: any, target?: any): void;
14
14
  rumStartTime: number | undefined;
15
- postHarvestCleanup({ status, responseText, xhr, targetApp }: {
15
+ postHarvestCleanup({ status, responseText, xhr }: {
16
16
  status: any;
17
17
  responseText: any;
18
18
  xhr: any;
19
- targetApp: any;
20
19
  }): void;
21
- processEntities(entities: any, targetApp: any): void;
22
20
  }
23
21
  import { AggregateBase } from '../../utils/aggregate-base';
24
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_event/aggregate/index.js"],"names":[],"mappings":"AAsBA;IACE,2BAA2C;IAC3C,2BA8BC;IA3BC,wBAAwB;IACxB,8BAA8B;IAC9B,8BAA8B;IA2BhC;;;;;OAKG;IACH,2BAHW,GAAC,WACD,GAAC,QAsEX;IAVC,iCAAyB;IAY3B;;;;;aA6CC;IAED,qDAaC;CACF;8BArL6B,4BAA4B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_event/aggregate/index.js"],"names":[],"mappings":"AAoBA;IACE,2BAA2C;IAC3C,2BA0BC;IAvBC,wBAAwB;IACxB,8BAA8B;IAC9B,8BAA8B;IAuBhC;;;;;OAKG;IACH,2BAHW,GAAC,WACD,GAAC,QAsEX;IAVC,iCAAyB;IAY3B;;;;aAyCC;CACF;8BA5J6B,4BAA4B"}
@@ -8,6 +8,8 @@ export class Aggregate extends AggregateBase {
8
8
  gzipper: typeof import("fflate").gzipSync | undefined;
9
9
  /** populated with the u8 string lib async */
10
10
  u8: typeof import("fflate").strToU8 | undefined;
11
+ /** flips to false if the compressor libraries cannot import */
12
+ shouldCompress: boolean;
11
13
  /** set by BCS response */
12
14
  entitled: boolean;
13
15
  /** set at BCS response, stored in runtime */
@@ -33,10 +35,17 @@ export class Aggregate extends AggregateBase {
33
35
  PRELOAD: string;
34
36
  }): void;
35
37
  prepUtils(): Promise<void>;
36
- makeHarvestPayload(shouldRetryOnFail: any): {
37
- targetApp: undefined;
38
- payload: undefined;
39
- }[] | undefined;
38
+ makeHarvestPayload(): {
39
+ qs: {
40
+ browser_monitoring_key: any;
41
+ type: string;
42
+ app_id: any;
43
+ protocol_version: string;
44
+ timestamp: any;
45
+ attributes: string;
46
+ };
47
+ body: any;
48
+ } | undefined;
40
49
  /**
41
50
  * returns the timestamps for the earliest and latest nodes in the provided array, even if out of order
42
51
  * @param {Object[]} [nodes] - the nodes to evaluate
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/aggregate/index.js"],"names":[],"mappings":"AAwBA;IACE,2BAAiC;IAIjC,sCAuFC;IA1FD,aAAe;IAKb,iFAAiF;IACjF,qBAAwB;IAGxB,2CAA2C;IAC3C,sDAAwB;IACxB,6CAA6C;IAC7C,gDAAmB;IAEnB,0BAA0B;IAC1B,kBAAqB;IACrB,6CAA6C;IAC7C,gBAA2B;IAE3B,qBAA2B;IAE3B,cAA8C;IAI9C,kCAAqG;IAmEvG,0BAEC;IAED,0BAMC;IAED,qBAUC;IAED;;;;;;OAMG;IACH,4BALW,OAAO,iBACP,OAAO;;;;;;QAEL,IAAI,CA8ChB;IAED,2BASC;IAED;;;oBAyCC;IAED;;;;OAIG;IACH,6BAHW,MAAM,EAAE,GACN;QAAE,UAAU,EAAE,MAAM,GAAC,SAAS,CAAC;QAAC,SAAS,EAAE,MAAM,GAAC,SAAS,CAAA;KAAE,CAUzE;IAED;;;;;;;;;;MAsEC;IAED,sCAKC;IAED;;;;OAIG;IACH,mCAKC;IAED,yDAAyD;IACzD,+CASC;IAED,yCAIC;CACF;8BA1W6B,4BAA4B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/aggregate/index.js"],"names":[],"mappings":"AAwBA;IACE,2BAAiC;IAIjC,sCAyFC;IA5FD,aAAe;IAKb,iFAAiF;IACjF,qBAAwB;IAGxB,2CAA2C;IAC3C,sDAAwB;IACxB,6CAA6C;IAC7C,gDAAmB;IACnB,+DAA+D;IAC/D,wBAA0B;IAE1B,0BAA0B;IAC1B,kBAAqB;IACrB,6CAA6C;IAC7C,gBAA2B;IAE3B,qBAA2B;IAE3B,cAA8C;IAI9C,kCAAqG;IAmEvG,0BAEC;IAED,0BAMC;IAED,qBAUC;IAED;;;;;;OAMG;IACH,4BALW,OAAO,iBACP,OAAO;;;;;;QAEL,IAAI,CA8ChB;IAED,2BAUC;IAED;;;;;;;;;;kBAwCC;IAED;;;;OAIG;IACH,6BAHW,MAAM,EAAE,GACN;QAAE,UAAU,EAAE,MAAM,GAAC,SAAS,CAAC;QAAC,SAAS,EAAE,MAAM,GAAC,SAAS,CAAA;KAAE,CAUzE;IAED;;;;;;;;;;MAsEC;IAED,sCAKC;IAED;;;;OAIG;IACH,mCAKC;IAED,yDAAyD;IACzD,+CASC;IAED,yCAIC;CACF;8BA5W6B,4BAA4B"}
@@ -15,6 +15,7 @@ export class Recorder {
15
15
  backloggedEvents: RecorderEvents;
16
16
  /** Only set to true once a snapshot node has been processed. Used to block harvests from sending before we know we have a snapshot */
17
17
  hasSeenSnapshot: boolean;
18
+ hasSeenMeta: boolean;
18
19
  /** Hold on to the last meta node, so that it can be re-inserted if the meta and snapshot nodes are broken up due to harvesting */
19
20
  lastMeta: boolean;
20
21
  /** The method to stop recording. This defaults to a noop, but is overwritten once the recording library is imported and initialized */
@@ -1 +1 @@
1
- {"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/shared/recorder.js"],"names":[],"mappings":"AAqBA;IAUE,+BAiCC;IAnCD,sBAAmB;IAGjB,iDAAiD;IACjD,kBAAgC;IAEhC,QAAyB;IACzB,mBAA6C;IAC7C,cAAqC;IAErC,qBAAwB;IACxB,0FAA0F;IAC1F,eAAkE;IAElE,iHAAiH;IACjH,uBAAgD;IAChD,mFAAmF;IACnF,iCAA0D;IAC1D,uIAAuI;IACvI,yBAA4B;IAC5B,kIAAkI;IAClI,kBAAqB;IACrB,uIAAuI;IACvI,0BAAwE;IAc1E,mBAEC;IAED;;;;;;;;;MAWC;IAED,kFAAkF;IAClF,oBAGC;IAED,qDAAqD;IACrD,8CAyCC;IAED;;;;;OAKG;IACH,aAHW,GAAC,cACD,GAAC,QAiCX;IAED,yHAAyH;IACzH,yCAiCC;IAED,0HAA0H;IAC1H,yBAOC;IAED,wBAEC;IAED,gCAAgC;IAChC,uCAGC;IAED;;;SAGK;IACL,oCAGC;;CACF;+BArO8B,mBAAmB"}
1
+ {"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/shared/recorder.js"],"names":[],"mappings":"AAqBA;IAUE,+BAkCC;IApCD,sBAAmB;IAGjB,iDAAiD;IACjD,kBAAgC;IAEhC,QAAyB;IACzB,mBAA6C;IAC7C,cAAqC;IAErC,qBAAwB;IACxB,0FAA0F;IAC1F,eAAkE;IAElE,iHAAiH;IACjH,uBAAgD;IAChD,mFAAmF;IACnF,iCAA0D;IAC1D,uIAAuI;IACvI,yBAA4B;IAC5B,qBAAwB;IACxB,kIAAkI;IAClI,kBAAqB;IACrB,uIAAuI;IACvI,0BAAwE;IAc1E,mBAEC;IAED;;;;;;;;;MAWC;IAED,kFAAkF;IAClF,oBAGC;IAED,qDAAqD;IACrD,8CAyCC;IAED;;;;;OAKG;IACH,aAHW,GAAC,cACD,GAAC,QAiCX;IAED,yHAAyH;IACzH,yCAiCC;IAED,0HAA0H;IAC1H,yBAOC;IAED,wBAEC;IAED,gCAAgC;IAChC,uCAGC;IAED;;;SAGK;IACL,oCAGC;;CACF;+BAtO8B,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_trace/aggregate/index.js"],"names":[],"mappings":"AAiBA;IACE,2BAAiC;IAEjC,2BAgBC;IAZC,0GAA0G;IAC1G,cAAyB;IACzB,mIAAmI;IACnI,uBAA0B;IAC1B,0CAA0C;IAC1C,oBAAuB;IACvB,0GAA0G;IAC1G,2BAA0C;IAO5C,gLAAgL;IAChL,mEA8DC;IAxDG,iCAAuB;IACvB,yJAAyJ;IACzJ,UAAsC;IACtC,eAA2D;IAyBD,UAAgE;IA8B9H,qCAWC;IAED,0CAIC;IAED;;;;;;;MAgDC;IAED,8DAA8D;IAC9D,qBAUC;IAED,2DAA2D;IAC3D,uBAMC;IAED,sCAGC;CACF;8BAhM6B,4BAA4B;6BAC7B,iBAAiB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_trace/aggregate/index.js"],"names":[],"mappings":"AAiBA;IACE,2BAAiC;IAEjC,2BAgBC;IAZC,0GAA0G;IAC1G,cAAyB;IACzB,mIAAmI;IACnI,uBAA0B;IAC1B,0CAA0C;IAC1C,oBAAuB;IACvB,0GAA0G;IAC1G,2BAA0C;IAO5C,gLAAgL;IAChL,mEA4DC;IAtDG,iCAAuB;IACvB,yJAAyJ;IACzJ,UAAsC;IACtC,eAA2D;IAyBD,UAAgE;IA4B9H,qCAWC;IAED,0CAIC;IAED;;;;;;;MAgDC;IAED,8DAA8D;IAC9D,qBAUC;IAED,2DAA2D;IAC3D,uBAMC;IAED,sCAGC;CACF;8BA9L6B,4BAA4B;6BAC7B,iBAAiB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/aggregate/index.js"],"names":[],"mappings":"AAeA;IACE,2BAAiC;IACjC;;OAiEC;IA5DC,2BAAwC;IACxC,iBAA8B;IAE9B,uDAA0E;IAe1E,yBAA+B;IAC/B,0CAAiC;IACjC,yBAA4C;IA0C9C,qCAUC;IAED,0EAmBC;IAED,2BAiBC;IAED;;;;;;;OAOG;IACH,6BAHW,mBAAmB,OAsB7B;;CAwGF;8BAlQ6B,4BAA4B;2CAGf,iCAAiC;4BAChD,eAAe"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/aggregate/index.js"],"names":[],"mappings":"AAeA;IACE,2BAAiC;IACjC;;OAgEC;IA3DC,2BAAwC;IACxC,iBAA8B;IAE9B,uDAA0E;IAe1E,yBAA+B;IAC/B,0CAAiC;IACjC,yBAA4C;IAyC9C,qCAUC;IAED,0EAmBC;IAED,2BAiBC;IAED;;;;;;;OAOG;IACH,6BAHW,mBAAmB,OAsB7B;;CAwGF;8BAjQ6B,4BAA4B;2CAGf,iCAAiC;4BAChD,eAAe"}