@newrelic/browser-agent 1.262.0 → 1.264.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/cdn/experimental.js +3 -7
  4. package/dist/cjs/cdn/pro.js +2 -2
  5. package/dist/cjs/cdn/spa.js +2 -2
  6. package/dist/cjs/common/aggregate/aggregator.js +3 -3
  7. package/dist/cjs/common/config/state/configurable.js +4 -4
  8. package/dist/cjs/common/config/state/init.js +11 -6
  9. package/dist/cjs/common/constants/env.cdn.js +1 -1
  10. package/dist/cjs/common/constants/env.npm.js +1 -1
  11. package/dist/cjs/common/constants/runtime.js +1 -3
  12. package/dist/cjs/common/context/shared-context.js +2 -2
  13. package/dist/cjs/common/drain/drain.js +5 -5
  14. package/dist/cjs/common/harvest/harvest.js +3 -3
  15. package/dist/cjs/common/serialize/bel-serializer.js +2 -2
  16. package/dist/cjs/common/session/session-entity.js +3 -3
  17. package/dist/cjs/common/timing/time-keeper.js +13 -2
  18. package/dist/cjs/common/url/encode.js +3 -5
  19. package/dist/cjs/common/util/console.js +3 -4
  20. package/dist/cjs/common/util/obfuscate.js +3 -3
  21. package/dist/cjs/common/util/submit-data.js +0 -1
  22. package/dist/cjs/common/vitals/vital-metric.js +1 -1
  23. package/dist/cjs/common/wrap/wrap-logger.js +1 -2
  24. package/dist/cjs/common/wrap/wrap-xhr.js +1 -1
  25. package/dist/cjs/features/ajax/aggregate/index.js +1 -1
  26. package/dist/cjs/features/ajax/instrument/index.js +1 -1
  27. package/dist/cjs/features/generic_events/aggregate/index.js +137 -0
  28. package/dist/cjs/features/generic_events/constants.js +8 -0
  29. package/dist/cjs/features/generic_events/index.js +12 -0
  30. package/dist/cjs/features/generic_events/instrument/index.js +27 -0
  31. package/dist/cjs/features/jserrors/aggregate/index.js +13 -12
  32. package/dist/cjs/features/jserrors/instrument/index.js +1 -1
  33. package/dist/cjs/features/logging/aggregate/index.js +6 -6
  34. package/dist/cjs/features/logging/constants.js +2 -5
  35. package/dist/cjs/features/logging/instrument/index.js +1 -1
  36. package/dist/cjs/features/metrics/aggregate/index.js +17 -1
  37. package/dist/cjs/features/metrics/instrument/index.js +1 -1
  38. package/dist/cjs/features/page_action/instrument/index.js +6 -6
  39. package/dist/cjs/features/page_view_event/aggregate/index.js +21 -5
  40. package/dist/cjs/features/page_view_event/aggregate/initialized-features.js +1 -1
  41. package/dist/cjs/features/page_view_event/instrument/index.js +1 -1
  42. package/dist/cjs/features/page_view_timing/aggregate/index.js +3 -3
  43. package/dist/cjs/features/page_view_timing/instrument/index.js +1 -1
  44. package/dist/cjs/features/session_replay/aggregate/index.js +3 -3
  45. package/dist/cjs/features/session_replay/instrument/index.js +1 -1
  46. package/dist/cjs/features/session_replay/shared/recorder.js +1 -1
  47. package/dist/cjs/features/session_replay/shared/stylesheet-evaluator.js +1 -1
  48. package/dist/cjs/features/session_trace/aggregate/index.js +1 -1
  49. package/dist/cjs/features/session_trace/aggregate/trace/storage.js +2 -2
  50. package/dist/cjs/features/session_trace/instrument/index.js +1 -1
  51. package/dist/cjs/features/soft_navigations/aggregate/bel-node.js +1 -1
  52. package/dist/cjs/features/soft_navigations/aggregate/index.js +1 -1
  53. package/dist/cjs/features/soft_navigations/aggregate/interaction.js +5 -5
  54. package/dist/cjs/features/soft_navigations/instrument/index.js +1 -1
  55. package/dist/cjs/features/spa/aggregate/index.js +3 -4
  56. package/dist/cjs/features/spa/aggregate/interaction.js +2 -2
  57. package/dist/cjs/features/spa/aggregate/serializer.js +1 -2
  58. package/dist/cjs/features/spa/instrument/index.js +1 -1
  59. package/dist/cjs/features/utils/aggregate-base.js +6 -3
  60. package/dist/cjs/features/utils/instrument-base.js +2 -2
  61. package/dist/cjs/features/utils/lazy-feature-loader.js +2 -2
  62. package/dist/cjs/index.js +21 -0
  63. package/dist/cjs/loaders/agent-base.js +1 -5
  64. package/dist/cjs/loaders/agent.js +3 -4
  65. package/dist/cjs/loaders/api/api.js +10 -8
  66. package/dist/cjs/loaders/api/apiAsync.js +1 -1
  67. package/dist/cjs/loaders/browser-agent.js +4 -3
  68. package/dist/cjs/loaders/configure/configure.js +4 -3
  69. package/dist/cjs/loaders/features/features.js +8 -4
  70. package/dist/cjs/loaders/micro-agent.js +6 -6
  71. package/dist/esm/cdn/experimental.js +2 -5
  72. package/dist/esm/cdn/pro.js +2 -2
  73. package/dist/esm/cdn/spa.js +2 -2
  74. package/dist/esm/common/aggregate/aggregator.js +3 -3
  75. package/dist/esm/common/config/state/configurable.js +4 -4
  76. package/dist/esm/common/config/state/init.js +11 -6
  77. package/dist/esm/common/constants/env.cdn.js +1 -1
  78. package/dist/esm/common/constants/env.npm.js +1 -1
  79. package/dist/esm/common/constants/runtime.js +0 -2
  80. package/dist/esm/common/context/shared-context.js +2 -2
  81. package/dist/esm/common/drain/drain.js +5 -5
  82. package/dist/esm/common/harvest/harvest.js +4 -4
  83. package/dist/esm/common/serialize/bel-serializer.js +2 -2
  84. package/dist/esm/common/session/session-entity.js +4 -4
  85. package/dist/esm/common/timing/time-keeper.js +12 -2
  86. package/dist/esm/common/url/encode.js +3 -5
  87. package/dist/esm/common/util/console.js +3 -4
  88. package/dist/esm/common/util/obfuscate.js +3 -3
  89. package/dist/esm/common/util/submit-data.js +0 -1
  90. package/dist/esm/common/vitals/vital-metric.js +1 -1
  91. package/dist/esm/common/wrap/wrap-logger.js +1 -2
  92. package/dist/esm/common/wrap/wrap-xhr.js +1 -1
  93. package/dist/esm/features/ajax/aggregate/index.js +1 -1
  94. package/dist/esm/features/ajax/instrument/index.js +1 -1
  95. package/dist/esm/features/generic_events/aggregate/index.js +129 -0
  96. package/dist/esm/features/generic_events/constants.js +2 -0
  97. package/dist/esm/features/generic_events/index.js +1 -0
  98. package/dist/esm/features/generic_events/instrument/index.js +20 -0
  99. package/dist/esm/features/jserrors/aggregate/index.js +13 -12
  100. package/dist/esm/features/jserrors/instrument/index.js +1 -1
  101. package/dist/esm/features/logging/aggregate/index.js +7 -7
  102. package/dist/esm/features/logging/constants.js +1 -4
  103. package/dist/esm/features/logging/instrument/index.js +1 -1
  104. package/dist/esm/features/metrics/aggregate/index.js +17 -1
  105. package/dist/esm/features/metrics/instrument/index.js +1 -1
  106. package/dist/esm/features/page_action/instrument/index.js +7 -6
  107. package/dist/esm/features/page_view_event/aggregate/index.js +22 -6
  108. package/dist/esm/features/page_view_event/aggregate/initialized-features.js +1 -1
  109. package/dist/esm/features/page_view_event/instrument/index.js +1 -1
  110. package/dist/esm/features/page_view_timing/aggregate/index.js +3 -3
  111. package/dist/esm/features/page_view_timing/instrument/index.js +1 -1
  112. package/dist/esm/features/session_replay/aggregate/index.js +3 -3
  113. package/dist/esm/features/session_replay/instrument/index.js +1 -1
  114. package/dist/esm/features/session_replay/shared/recorder.js +1 -1
  115. package/dist/esm/features/session_replay/shared/stylesheet-evaluator.js +1 -1
  116. package/dist/esm/features/session_trace/aggregate/index.js +1 -1
  117. package/dist/esm/features/session_trace/aggregate/trace/storage.js +2 -2
  118. package/dist/esm/features/session_trace/instrument/index.js +1 -1
  119. package/dist/esm/features/soft_navigations/aggregate/bel-node.js +1 -1
  120. package/dist/esm/features/soft_navigations/aggregate/index.js +1 -1
  121. package/dist/esm/features/soft_navigations/aggregate/interaction.js +5 -5
  122. package/dist/esm/features/soft_navigations/instrument/index.js +1 -1
  123. package/dist/esm/features/spa/aggregate/index.js +3 -4
  124. package/dist/esm/features/spa/aggregate/interaction.js +2 -2
  125. package/dist/esm/features/spa/aggregate/serializer.js +1 -2
  126. package/dist/esm/features/spa/instrument/index.js +1 -1
  127. package/dist/esm/features/utils/aggregate-base.js +7 -4
  128. package/dist/esm/features/utils/instrument-base.js +2 -2
  129. package/dist/esm/features/utils/lazy-feature-loader.js +2 -2
  130. package/dist/esm/index.js +3 -0
  131. package/dist/esm/loaders/agent-base.js +1 -5
  132. package/dist/esm/loaders/agent.js +3 -4
  133. package/dist/esm/loaders/api/api.js +10 -8
  134. package/dist/esm/loaders/api/apiAsync.js +1 -1
  135. package/dist/esm/loaders/browser-agent.js +3 -2
  136. package/dist/esm/loaders/configure/configure.js +4 -3
  137. package/dist/esm/loaders/features/features.js +8 -4
  138. package/dist/esm/loaders/micro-agent.js +6 -6
  139. package/dist/types/common/aggregate/aggregator.d.ts.map +1 -1
  140. package/dist/types/common/config/state/init.d.ts.map +1 -1
  141. package/dist/types/common/constants/runtime.d.ts +0 -1
  142. package/dist/types/common/constants/runtime.d.ts.map +1 -1
  143. package/dist/types/common/drain/drain.d.ts.map +1 -1
  144. package/dist/types/common/serialize/bel-serializer.d.ts.map +1 -1
  145. package/dist/types/common/timing/time-keeper.d.ts +2 -1
  146. package/dist/types/common/timing/time-keeper.d.ts.map +1 -1
  147. package/dist/types/common/url/encode.d.ts.map +1 -1
  148. package/dist/types/common/util/console.d.ts +1 -1
  149. package/dist/types/common/util/console.d.ts.map +1 -1
  150. package/dist/types/common/util/submit-data.d.ts.map +1 -1
  151. package/dist/types/common/wrap/wrap-logger.d.ts.map +1 -1
  152. package/dist/types/features/{page_action → generic_events}/aggregate/index.d.ts +7 -5
  153. package/dist/types/features/generic_events/aggregate/index.d.ts.map +1 -0
  154. package/dist/types/features/generic_events/constants.d.ts +2 -0
  155. package/dist/types/features/generic_events/constants.d.ts.map +1 -0
  156. package/dist/types/features/generic_events/index.d.ts +2 -0
  157. package/dist/types/features/generic_events/index.d.ts.map +1 -0
  158. package/dist/types/features/generic_events/instrument/index.d.ts +6 -0
  159. package/dist/types/features/generic_events/instrument/index.d.ts.map +1 -0
  160. package/dist/types/features/jserrors/aggregate/index.d.ts.map +1 -1
  161. package/dist/types/features/logging/constants.d.ts +0 -3
  162. package/dist/types/features/logging/constants.d.ts.map +1 -1
  163. package/dist/types/features/metrics/aggregate/index.d.ts.map +1 -1
  164. package/dist/types/features/page_action/instrument/index.d.ts +5 -4
  165. package/dist/types/features/page_action/instrument/index.d.ts.map +1 -1
  166. package/dist/types/features/page_view_event/aggregate/index.d.ts.map +1 -1
  167. package/dist/types/features/page_view_timing/aggregate/index.d.ts.map +1 -1
  168. package/dist/types/features/session_replay/shared/recorder.d.ts.map +1 -1
  169. package/dist/types/features/spa/aggregate/index.d.ts.map +1 -1
  170. package/dist/types/features/spa/aggregate/interaction.d.ts.map +1 -1
  171. package/dist/types/features/spa/aggregate/serializer.d.ts.map +1 -1
  172. package/dist/types/features/utils/aggregate-base.d.ts.map +1 -1
  173. package/dist/types/index.d.ts +3 -0
  174. package/dist/types/loaders/agent-base.d.ts +0 -1
  175. package/dist/types/loaders/agent-base.d.ts.map +1 -1
  176. package/dist/types/loaders/agent.d.ts.map +1 -1
  177. package/dist/types/loaders/api/api.d.ts.map +1 -1
  178. package/dist/types/loaders/browser-agent.d.ts.map +1 -1
  179. package/dist/types/loaders/configure/configure.d.ts.map +1 -1
  180. package/dist/types/loaders/features/features.d.ts +1 -0
  181. package/dist/types/loaders/features/features.d.ts.map +1 -1
  182. package/package.json +25 -6
  183. package/src/cdn/experimental.js +2 -4
  184. package/src/cdn/pro.js +2 -2
  185. package/src/cdn/spa.js +2 -2
  186. package/src/common/aggregate/aggregator.js +2 -3
  187. package/src/common/config/state/configurable.js +4 -4
  188. package/src/common/config/state/init.js +6 -4
  189. package/src/common/constants/runtime.js +0 -2
  190. package/src/common/context/shared-context.js +2 -2
  191. package/src/common/drain/drain.js +4 -5
  192. package/src/common/harvest/harvest.js +4 -4
  193. package/src/common/serialize/bel-serializer.js +1 -2
  194. package/src/common/session/session-entity.js +4 -4
  195. package/src/common/timing/time-keeper.js +14 -2
  196. package/src/common/url/encode.js +2 -3
  197. package/src/common/util/console.js +3 -4
  198. package/src/common/util/obfuscate.js +3 -3
  199. package/src/common/util/submit-data.js +0 -1
  200. package/src/common/wrap/wrap-logger.js +1 -2
  201. package/src/common/wrap/wrap-xhr.js +1 -1
  202. package/src/features/generic_events/aggregate/index.js +133 -0
  203. package/src/features/generic_events/constants.js +3 -0
  204. package/src/features/generic_events/index.js +1 -0
  205. package/src/features/generic_events/instrument/index.js +22 -0
  206. package/src/features/jserrors/aggregate/index.js +4 -5
  207. package/src/features/logging/aggregate/index.js +6 -6
  208. package/src/features/logging/constants.js +0 -4
  209. package/src/features/metrics/aggregate/index.js +12 -0
  210. package/src/features/page_action/instrument/index.js +6 -6
  211. package/src/features/page_view_event/aggregate/index.js +22 -5
  212. package/src/features/page_view_event/aggregate/initialized-features.js +1 -1
  213. package/src/features/page_view_timing/aggregate/index.js +1 -2
  214. package/src/features/session_replay/aggregate/index.js +1 -1
  215. package/src/features/session_replay/shared/recorder.js +1 -1
  216. package/src/features/spa/aggregate/index.js +2 -3
  217. package/src/features/spa/aggregate/interaction.js +1 -2
  218. package/src/features/spa/aggregate/serializer.js +1 -2
  219. package/src/features/utils/aggregate-base.js +7 -4
  220. package/src/features/utils/instrument-base.js +2 -2
  221. package/src/features/utils/lazy-feature-loader.js +2 -2
  222. package/src/index.js +3 -0
  223. package/src/loaders/agent-base.js +1 -5
  224. package/src/loaders/agent.js +3 -4
  225. package/src/loaders/api/api.js +10 -8
  226. package/src/loaders/api/apiAsync.js +1 -1
  227. package/src/loaders/browser-agent.js +5 -3
  228. package/src/loaders/configure/configure.js +5 -1
  229. package/src/loaders/features/features.js +8 -4
  230. package/src/loaders/micro-agent.js +6 -6
  231. package/dist/cjs/cdn/polyfills/lite.js +0 -16
  232. package/dist/cjs/cdn/polyfills/pro.js +0 -21
  233. package/dist/cjs/cdn/polyfills/spa.js +0 -22
  234. package/dist/cjs/cdn/polyfills.js +0 -24
  235. package/dist/cjs/common/util/map-own.js +0 -31
  236. package/dist/cjs/features/page_action/aggregate/index.js +0 -121
  237. package/dist/esm/cdn/polyfills/lite.js +0 -14
  238. package/dist/esm/cdn/polyfills/pro.js +0 -19
  239. package/dist/esm/cdn/polyfills/spa.js +0 -20
  240. package/dist/esm/cdn/polyfills.js +0 -27
  241. package/dist/esm/common/util/map-own.js +0 -24
  242. package/dist/esm/features/page_action/aggregate/index.js +0 -114
  243. package/dist/types/cdn/polyfills/lite.d.ts +0 -2
  244. package/dist/types/cdn/polyfills/lite.d.ts.map +0 -1
  245. package/dist/types/cdn/polyfills/pro.d.ts +0 -2
  246. package/dist/types/cdn/polyfills/pro.d.ts.map +0 -1
  247. package/dist/types/cdn/polyfills/spa.d.ts +0 -2
  248. package/dist/types/cdn/polyfills/spa.d.ts.map +0 -1
  249. package/dist/types/cdn/polyfills.d.ts +0 -2
  250. package/dist/types/cdn/polyfills.d.ts.map +0 -1
  251. package/dist/types/common/util/map-own.d.ts +0 -3
  252. package/dist/types/common/util/map-own.d.ts.map +0 -1
  253. package/dist/types/features/page_action/aggregate/index.d.ts.map +0 -1
  254. package/src/cdn/polyfills/lite.js +0 -20
  255. package/src/cdn/polyfills/pro.js +0 -30
  256. package/src/cdn/polyfills/spa.js +0 -32
  257. package/src/cdn/polyfills.js +0 -27
  258. package/src/common/util/map-own.js +0 -22
  259. package/src/features/page_action/aggregate/index.js +0 -114
package/CHANGELOG.md CHANGED
@@ -3,6 +3,27 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.264.0](https://github.com/newrelic/newrelic-browser-agent/compare/v1.263.0...v1.264.0) (2024-08-06)
7
+
8
+
9
+ ### Features
10
+
11
+ * Create generic events feature with 1,000 event limit ([#1121](https://github.com/newrelic/newrelic-browser-agent/issues/1121)) ([63ab04f](https://github.com/newrelic/newrelic-browser-agent/commit/63ab04fa9b2a0c347e175c9174f563e73767933b))
12
+ * Report Page Actions with Generic Events Feature ([#1124](https://github.com/newrelic/newrelic-browser-agent/issues/1124)) ([0d52acf](https://github.com/newrelic/newrelic-browser-agent/commit/0d52acf9eaa9a2c170459f03e9edad25375f4c1c))
13
+
14
+ ## [1.263.0](https://github.com/newrelic/newrelic-browser-agent/compare/v1.262.0...v1.263.0) (2024-07-25)
15
+
16
+
17
+ ### Features
18
+
19
+ * Optimize bundle size with warning codes ([#1111](https://github.com/newrelic/newrelic-browser-agent/issues/1111)) ([6ab7d2b](https://github.com/newrelic/newrelic-browser-agent/commit/6ab7d2bee5053fc75c0d20c6257afea5cf16d76d))
20
+ * Shut down agent if improperly configured ([#1116](https://github.com/newrelic/newrelic-browser-agent/issues/1116)) ([edc20d4](https://github.com/newrelic/newrelic-browser-agent/commit/edc20d4f81d1c0662f3f244240cc968b1f3870c9))
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * Prevent agent using invalid date header ([#1122](https://github.com/newrelic/newrelic-browser-agent/issues/1122)) ([6851c1b](https://github.com/newrelic/newrelic-browser-agent/commit/6851c1b1733c513ab4de119e875593a418e51b93))
26
+
6
27
  ## [1.262.0](https://github.com/newrelic/newrelic-browser-agent/compare/v1.261.2...v1.262.0) (2024-07-09)
7
28
 
8
29
 
package/README.md CHANGED
@@ -78,9 +78,9 @@ const options = {
78
78
  The following features may be disabled by adding `init` entries as shown above. Note that the `page_view_event` feature may not be disabled.
79
79
 
80
80
  - `ajax`
81
+ - `generic_events`
81
82
  - `jserrors`
82
83
  - `metrics`
83
- - `page_action`
84
84
  - `page_view_timing`
85
85
  - `session_replay`
86
86
  - `session_trace`
@@ -125,7 +125,7 @@ The following feature modules are available for inclusion in the `features` arra
125
125
  import { Ajax } from '@newrelic/browser-agent/features/ajax';
126
126
  import { JSErrors } from '@newrelic/browser-agent/features/jserrors';
127
127
  import { Metrics } from '@newrelic/browser-agent/features/metrics';
128
- import { PageAction } from '@newrelic/browser-agent/features/page_action';
128
+ import { GenericEvents } from '@newrelic/browser-agent/features/generic_events';
129
129
  import { PageViewEvent } from '@newrelic/browser-agent/features/page_view_event';
130
130
  import { PageViewTiming } from '@newrelic/browser-agent/features/page_view_timing';
131
131
  import { SessionTrace } from '@newrelic/browser-agent/features/session_trace';
@@ -8,8 +8,8 @@ var _instrument4 = require("../features/jserrors/instrument");
8
8
  var _instrument5 = require("../features/ajax/instrument");
9
9
  var _instrument6 = require("../features/session_trace/instrument");
10
10
  var _instrument7 = require("../features/session_replay/instrument");
11
- var _instrument8 = require("../features/soft_navigations/instrument");
12
- var _instrument9 = require("../features/page_action/instrument");
11
+ var _instrument8 = require("../features/generic_events/instrument");
12
+ var _instrument9 = require("../features/soft_navigations/instrument");
13
13
  var _instrument10 = require("../features/logging/instrument");
14
14
  /*
15
15
  * Copyright 2023 New Relic Corporation. All rights reserved.
@@ -22,11 +22,7 @@ var _instrument10 = require("../features/logging/instrument");
22
22
  * It is not production ready, and is not intended to be imported or implemented in any build of the browser agent
23
23
  */
24
24
 
25
- // import { Instrument as InstrumentSpa } from '../features/spa/instrument'
26
-
27
25
  new _agent.Agent({
28
- features: [_instrument5.Instrument, _instrument.Instrument, _instrument2.Instrument, _instrument6.Instrument, _instrument7.Instrument, _instrument3.Instrument, _instrument9.Instrument, _instrument4.Instrument, _instrument10.Instrument,
29
- // InstrumentSpa,
30
- _instrument8.Instrument],
26
+ features: [_instrument5.Instrument, _instrument.Instrument, _instrument2.Instrument, _instrument6.Instrument, _instrument7.Instrument, _instrument3.Instrument, _instrument4.Instrument, _instrument8.Instrument, _instrument10.Instrument, _instrument9.Instrument],
31
27
  loaderType: 'experimental'
32
28
  });
@@ -8,7 +8,7 @@ var _instrument4 = require("../features/jserrors/instrument");
8
8
  var _instrument5 = require("../features/ajax/instrument");
9
9
  var _instrument6 = require("../features/session_trace/instrument");
10
10
  var _instrument7 = require("../features/session_replay/instrument");
11
- var _instrument8 = require("../features/page_action/instrument");
11
+ var _instrument8 = require("../features/generic_events/instrument");
12
12
  var _instrument9 = require("../features/logging/instrument");
13
13
  /**
14
14
  * @file Creates a "Pro" agent loader bundle composed of the core Agent and all available feature modules except `spa`.
@@ -16,6 +16,6 @@ var _instrument9 = require("../features/logging/instrument");
16
16
  */
17
17
 
18
18
  new _agent.Agent({
19
- features: [_instrument.Instrument, _instrument2.Instrument, _instrument6.Instrument, _instrument7.Instrument, _instrument5.Instrument, _instrument3.Instrument, _instrument8.Instrument, _instrument4.Instrument, _instrument9.Instrument],
19
+ features: [_instrument.Instrument, _instrument2.Instrument, _instrument6.Instrument, _instrument7.Instrument, _instrument5.Instrument, _instrument3.Instrument, _instrument4.Instrument, _instrument8.Instrument, _instrument9.Instrument],
20
20
  loaderType: 'pro'
21
21
  });
@@ -10,14 +10,14 @@ var _instrument6 = require("../features/session_trace/instrument");
10
10
  var _instrument7 = require("../features/session_replay/instrument");
11
11
  var _instrument8 = require("../features/soft_navigations/instrument");
12
12
  var _instrument9 = require("../features/spa/instrument");
13
- var _instrument10 = require("../features/page_action/instrument");
13
+ var _instrument10 = require("../features/generic_events/instrument");
14
14
  var _instrument11 = require("../features/logging/instrument");
15
15
  /**
16
16
  * @file Creates a "SPA" agent loader bundle composed of the core agent and all available feature modules.
17
17
  */
18
18
 
19
19
  new _agent.Agent({
20
- features: [_instrument5.Instrument, _instrument.Instrument, _instrument2.Instrument, _instrument6.Instrument, _instrument7.Instrument, _instrument3.Instrument, _instrument10.Instrument, _instrument4.Instrument, _instrument11.Instrument, _instrument8.Instrument, _instrument9.Instrument // either the softnav or the old spa will be used (not both), but we still need to pack both to avoid dynamic import for instrument files
20
+ features: [_instrument5.Instrument, _instrument.Instrument, _instrument2.Instrument, _instrument6.Instrument, _instrument7.Instrument, _instrument3.Instrument, _instrument4.Instrument, _instrument10.Instrument, _instrument11.Instrument, _instrument8.Instrument, _instrument9.Instrument // either the softnav or the old spa will be used (not both), but we still need to pack both to avoid dynamic import for instrument files
21
21
  ],
22
22
  loaderType: 'spa'
23
23
  });
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Aggregator = void 0;
7
7
  var _sharedContext = require("../context/shared-context");
8
- var _mapOwn = require("../util/map-own");
9
8
  /*
10
9
  * Copyright 2020 New Relic Corporation. All rights reserved.
11
10
  * SPDX-License-Identifier: Apache-2.0
@@ -36,7 +35,7 @@ class Aggregator extends _sharedContext.SharedContext {
36
35
  oldMetrics.count += metrics.count;
37
36
 
38
37
  // iterate through each new metric and merge
39
- (0, _mapOwn.mapOwn)(metrics, function (key, value) {
38
+ Object.keys(metrics || {}).forEach(key => {
40
39
  // count is a special case handled above
41
40
  if (key === 'count') return;
42
41
  var oldMetric = oldMetrics[key];
@@ -96,7 +95,8 @@ function aggregateMetrics(newMetrics, oldMetrics) {
96
95
  count: 0
97
96
  };
98
97
  oldMetrics.count += 1;
99
- (0, _mapOwn.mapOwn)(newMetrics, function (key, value) {
98
+ Object.entries(newMetrics || {}).forEach(_ref => {
99
+ let [key, value] = _ref;
100
100
  oldMetrics[key] = updateMetric(value, oldMetrics[key]);
101
101
  });
102
102
  return oldMetrics;
@@ -7,8 +7,8 @@ exports.getModeledObject = getModeledObject;
7
7
  var _console = require("../../util/console");
8
8
  function getModeledObject(obj, model) {
9
9
  try {
10
- if (!obj || typeof obj !== 'object') return (0, _console.warn)('Setting a Configurable requires an object as input');
11
- if (!model || typeof model !== 'object') return (0, _console.warn)('Setting a Configurable requires a model to set its initial properties');
10
+ if (!obj || typeof obj !== 'object') return (0, _console.warn)(3);
11
+ if (!model || typeof model !== 'object') return (0, _console.warn)(4);
12
12
  // allow getters and setters to pass from model to target
13
13
  const output = Object.create(Object.getPrototypeOf(model), Object.getOwnPropertyDescriptors(model));
14
14
  const target = Object.keys(output).length === 0 ? obj : output;
@@ -21,11 +21,11 @@ function getModeledObject(obj, model) {
21
21
  }
22
22
  if (Array.isArray(obj[key]) && Array.isArray(model[key])) output[key] = Array.from(new Set([...obj[key], ...model[key]]));else if (typeof obj[key] === 'object' && typeof model[key] === 'object') output[key] = getModeledObject(obj[key], model[key]);else output[key] = obj[key];
23
23
  } catch (e) {
24
- (0, _console.warn)('An error occurred while setting a property of a Configurable', e);
24
+ (0, _console.warn)(1, e);
25
25
  }
26
26
  }
27
27
  return output;
28
28
  } catch (err) {
29
- (0, _console.warn)('An error occured while setting a Configurable', err);
29
+ (0, _console.warn)(2, err);
30
30
  }
31
31
  }
@@ -53,6 +53,11 @@ const model = () => {
53
53
  allowed_origins: undefined
54
54
  },
55
55
  feature_flags: [],
56
+ generic_events: {
57
+ enabled: true,
58
+ harvestTimeSeconds: 30,
59
+ autoStart: true
60
+ },
56
61
  harvest: {
57
62
  tooManyRequestsDelay: 60
58
63
  },
@@ -73,9 +78,7 @@ const model = () => {
73
78
  },
74
79
  obfuscate: undefined,
75
80
  page_action: {
76
- enabled: true,
77
- harvestTimeSeconds: 30,
78
- autoStart: true
81
+ enabled: true
79
82
  },
80
83
  page_view_event: {
81
84
  enabled: true,
@@ -117,6 +120,8 @@ const model = () => {
117
120
  // serialize images for collection without public asset url -- right now this is only useful for testing as it easily generates payloads too large to be harvested
118
121
  inline_stylesheet: true,
119
122
  // serialize css for collection without public asset url
123
+ fix_stylesheets: true,
124
+ // fetch missing stylesheet resources for inlining, only works if 'inline_stylesheet' is also true
120
125
  // recording config settings
121
126
  mask_all_inputs: true,
122
127
  // this has a getter/setter to facilitate validation of the selectors
@@ -124,7 +129,7 @@ const model = () => {
124
129
  return hiddenState.mask_selector;
125
130
  },
126
131
  set mask_text_selector(val) {
127
- if ((0, _querySelector.isValidSelector)(val)) hiddenState.mask_selector = "".concat(val, ",").concat(nrMask);else if (val === '' || val === null) hiddenState.mask_selector = nrMask;else (0, _console.warn)('An invalid session_replay.mask_selector was provided. \'*\' will be used.', val);
132
+ if ((0, _querySelector.isValidSelector)(val)) hiddenState.mask_selector = "".concat(val, ",").concat(nrMask);else if (val === '' || val === null) hiddenState.mask_selector = nrMask;else (0, _console.warn)(5, val);
128
133
  },
129
134
  // these properties only have getters because they are enforcable constants and should error if someone tries to override them
130
135
  get block_class() {
@@ -142,7 +147,7 @@ const model = () => {
142
147
  return hiddenState.block_selector;
143
148
  },
144
149
  set block_selector(val) {
145
- if ((0, _querySelector.isValidSelector)(val)) hiddenState.block_selector += ",".concat(val);else if (val !== '') (0, _console.warn)('An invalid session_replay.block_selector was provided and will not be used', val);
150
+ if ((0, _querySelector.isValidSelector)(val)) hiddenState.block_selector += ",".concat(val);else if (val !== '') (0, _console.warn)(6, val);
146
151
  },
147
152
  // password: must always be present and true no matter what customer sets
148
153
  get mask_input_options() {
@@ -152,7 +157,7 @@ const model = () => {
152
157
  if (val && typeof val === 'object') hiddenState.mask_input_options = {
153
158
  ...val,
154
159
  password: true
155
- };else (0, _console.warn)('An invalid session_replay.mask_input_option was provided and will not be used', val);
160
+ };else (0, _console.warn)(7, val);
156
161
  }
157
162
  },
158
163
  session_trace: {
@@ -12,7 +12,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
12
12
  /**
13
13
  * Exposes the version of the agent
14
14
  */
15
- const VERSION = exports.VERSION = "1.262.0";
15
+ const VERSION = exports.VERSION = "1.264.0";
16
16
 
17
17
  /**
18
18
  * Exposes the build type of the agent
@@ -12,7 +12,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
12
12
  /**
13
13
  * Exposes the version of the agent
14
14
  */
15
- const VERSION = exports.VERSION = "1.262.0";
15
+ const VERSION = exports.VERSION = "1.264.0";
16
16
 
17
17
  /**
18
18
  * Exposes the build type of the agent
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.supportsSendBeacon = exports.originTime = exports.loadedAsDeferredBrowserScript = exports.isiOS = exports.isWorkerScope = exports.isIE = exports.isBrowserScope = exports.initiallyHidden = exports.initialLocation = exports.iOSBelow16 = exports.globalScope = exports.ffVersion = void 0;
6
+ exports.supportsSendBeacon = exports.originTime = exports.loadedAsDeferredBrowserScript = exports.isiOS = exports.isWorkerScope = exports.isBrowserScope = exports.initiallyHidden = exports.initialLocation = exports.iOSBelow16 = exports.globalScope = exports.ffVersion = void 0;
7
7
  var _now = require("../timing/now");
8
8
  /**
9
9
  * @file Contains constants about the environment the agent is running
@@ -42,8 +42,6 @@ const ffVersion = exports.ffVersion = (() => {
42
42
  }
43
43
  return 0;
44
44
  })();
45
- const isIE = exports.isIE = Boolean(isBrowserScope && window.document.documentMode); // deprecated property that only works in IE
46
-
47
45
  const supportsSendBeacon = exports.supportsSendBeacon = !!globalScope.navigator?.sendBeacon;
48
46
 
49
47
  /**
@@ -12,7 +12,7 @@ const model = {
12
12
  class SharedContext {
13
13
  constructor(context) {
14
14
  try {
15
- if (typeof context !== 'object') return (0, _console.warn)('shared context requires an object as input');
15
+ if (typeof context !== 'object') return (0, _console.warn)(8);
16
16
  this.sharedContext = {};
17
17
  Object.assign(this.sharedContext, model);
18
18
  Object.entries(context).forEach(_ref => {
@@ -20,7 +20,7 @@ class SharedContext {
20
20
  if (Object.keys(model).includes(key)) this.sharedContext[key] = value;
21
21
  });
22
22
  } catch (err) {
23
- (0, _console.warn)('An error occurred while setting SharedContext', err);
23
+ (0, _console.warn)(9, err);
24
24
  }
25
25
  }
26
26
  }
@@ -7,7 +7,6 @@ exports.deregisterDrain = deregisterDrain;
7
7
  exports.drain = drain;
8
8
  exports.registerDrain = registerDrain;
9
9
  var _contextualEe = require("../event-emitter/contextual-ee");
10
- var _mapOwn = require("../util/map-own");
11
10
  var _registerHandler = require("../event-emitter/register-handler");
12
11
  var _features = require("../../loaders/features/features");
13
12
  /*
@@ -107,7 +106,7 @@ function drainGroup(agentIdentifier, group) {
107
106
  let activateGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
108
107
  const baseEE = agentIdentifier ? _contextualEe.ee.get(agentIdentifier) : _contextualEe.ee;
109
108
  const handlers = _registerHandler.registerHandler.handlers; // other storage in registerHandler
110
- if (!baseEE.backlog || !handlers) return;
109
+ if (baseEE.aborted || !baseEE.backlog || !handlers) return;
111
110
 
112
111
  // Only activated features being drained should run queued listeners on buffered events. Deactivated features only need to release memory.
113
112
  if (activateGroup) {
@@ -119,8 +118,9 @@ function drainGroup(agentIdentifier, group) {
119
118
  // eslint-disable-line no-unmodified-loop-condition
120
119
  emitEvent(bufferedEventsInGroup[i], groupHandlers);
121
120
  }
122
- (0, _mapOwn.mapOwn)(groupHandlers, function (eventType, handlerRegistrationList) {
123
- (0, _mapOwn.mapOwn)(handlerRegistrationList, function (i, registration) {
121
+ Object.entries(groupHandlers).forEach(_ref3 => {
122
+ let [eventType, handlerRegistrationList] = _ref3;
123
+ Object.values(handlerRegistrationList || {}).forEach(registration => {
124
124
  // registration is an array of: [targetEE, eventHandler]
125
125
  registration[0].on(eventType, registration[1]);
126
126
  });
@@ -141,7 +141,7 @@ function drainGroup(agentIdentifier, group) {
141
141
  */
142
142
  function emitEvent(evt, groupHandlers) {
143
143
  var type = evt[1];
144
- (0, _mapOwn.mapOwn)(groupHandlers[type], function (i, registration) {
144
+ Object.values(groupHandlers[type] || {}).forEach(registration => {
145
145
  var sourceEE = evt[0];
146
146
  var ee = registration[0];
147
147
  if (ee === sourceEE) {
@@ -156,7 +156,7 @@ class Harvest extends _sharedContext.SharedContext {
156
156
  body = (0, _stringify.stringify)(body);
157
157
  }
158
158
  /** Warn --once per endpoint-- if the agent tries to send large payloads */
159
- if (body.length > 750000 && (warnings[endpoint] = (warnings?.[endpoint] || 0) + 1) === 1) (0, _console.warn)("The Browser Agent is attempting to send a very large payload to /".concat(endpoint, ". This is usually tied to large amounts of custom attributes. Please check your configurations."));
159
+ if (body.length > 750000 && (warnings[endpoint] = (warnings?.[endpoint] || 0) + 1) === 1) (0, _console.warn)(28, endpoint);
160
160
  }
161
161
  if (!body || body.length === 0 || body === '{}' || body === '[]') {
162
162
  // If body is null, undefined, or an empty object or array, send an empty string instead
@@ -171,11 +171,11 @@ class Harvest extends _sharedContext.SharedContext {
171
171
  /* Since workers don't support sendBeacon right now, they can only use XHR method.
172
172
  Because they still do permit synch XHR, the idea is that at final harvest time (worker is closing),
173
173
  we just make a BLOCKING request--trivial impact--with the remaining data as a temp fill-in for sendBeacon.
174
- Following the removal of img-element method, IE will also use sync XHR on page dismissal to ensure final analytics are sent. */
174
+ Following the removal of img-element method. */
175
175
  let result = submitMethod({
176
176
  url: fullUrl,
177
177
  body,
178
- sync: opts.unload && (_runtime.isWorkerScope || _runtime.isIE),
178
+ sync: opts.unload && _runtime.isWorkerScope,
179
179
  headers
180
180
  });
181
181
  if (!opts.unload && cbFinished && submitMethod === submitData.xhr) {
@@ -7,7 +7,6 @@ exports.addCustomAttributes = addCustomAttributes;
7
7
  exports.getAddStringContext = getAddStringContext;
8
8
  exports.nullable = nullable;
9
9
  exports.numeric = numeric;
10
- var _mapOwn = require("../util/map-own");
11
10
  var _stringify = require("../util/stringify");
12
11
  var _obfuscate = require("../util/obfuscate");
13
12
  /*
@@ -48,7 +47,8 @@ function getAddStringContext(agentIdentifier) {
48
47
  }
49
48
  function addCustomAttributes(attrs, addString) {
50
49
  var attrParts = [];
51
- (0, _mapOwn.mapOwn)(attrs, function (key, val) {
50
+ Object.entries(attrs || {}).forEach(_ref => {
51
+ let [key, val] = _ref;
52
52
  if (attrParts.length >= MAX_ATTRIBUTES) return;
53
53
  var type = 5;
54
54
  var serializedValue;
@@ -64,7 +64,7 @@ class SessionEntity {
64
64
  * if the event was spawned on the current page or an adjacent page, and the behavior tied
65
65
  * to storage events is critical to apply only to cross-tab behavior
66
66
  * */
67
- if (_runtime.isBrowserScope && !_runtime.isIE) {
67
+ if (_runtime.isBrowserScope) {
68
68
  (0, _eventListenerOpts.windowAddEventListener)('storage', event => {
69
69
  if (event.key === this.lookupKey) {
70
70
  const obj = typeof event.newValue === 'string' ? JSON.parse(event.newValue) : event.newValue;
@@ -195,7 +195,7 @@ class SessionEntity {
195
195
  }
196
196
  return obj;
197
197
  } catch (e) {
198
- (0, _console.warn)('Failed to read from storage API', e);
198
+ (0, _console.warn)(10, e);
199
199
  // storage is inaccessible
200
200
  return {};
201
201
  }
@@ -221,7 +221,7 @@ class SessionEntity {
221
221
  return data;
222
222
  } catch (e) {
223
223
  // storage is inaccessible
224
- (0, _console.warn)('Failed to write to the storage API', e);
224
+ (0, _console.warn)(11, e);
225
225
  return null;
226
226
  }
227
227
  }
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.TimeKeeper = void 0;
7
7
  var _runtime = require("../constants/runtime");
8
8
  var _config = require("../config/config");
9
+ const rfc2616Regex = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), ([0-3][0-9]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ([0-9]{4}) ([01][0-9]|2[0-3])(:[0-5][0-9]){2} GMT$/;
10
+
9
11
  /**
10
12
  * Class used to adjust the timestamp of harvested data to New Relic server time. This
11
13
  * is done by tracking the performance timings of the RUM call and applying a calculation
@@ -34,7 +36,7 @@ class TimeKeeper {
34
36
  /**
35
37
  * Represents whether the timekeeper is in a state that it can accurately convert
36
38
  * timestamps.
37
- * @type {number}
39
+ * @type {boolean}
38
40
  */
39
41
  #ready = false;
40
42
  constructor(agentIdentifier) {
@@ -47,6 +49,9 @@ class TimeKeeper {
47
49
  get correctedOriginTime() {
48
50
  return this.#correctedOriginTime;
49
51
  }
52
+ get localTimeDiff() {
53
+ return this.#localTimeDiff;
54
+ }
50
55
 
51
56
  /**
52
57
  * Process a rum request to calculate NR server time.
@@ -55,12 +60,16 @@ class TimeKeeper {
55
60
  * @param endTime {number} The end time of the RUM request
56
61
  */
57
62
  processRumRequest(rumRequest, startTime, endTime) {
58
- this.processStoredDiff();
63
+ this.processStoredDiff(); // Check session entity for stored time diff
59
64
  if (this.#ready) return; // Server time calculated from session entity
65
+
60
66
  const responseDateHeader = rumRequest.getResponseHeader('Date');
61
67
  if (!responseDateHeader) {
62
68
  throw new Error('Missing date header on rum response.');
63
69
  }
70
+ if (!rfc2616Regex.test(responseDateHeader)) {
71
+ throw new Error('Date header invalid format.');
72
+ }
64
73
  const medianRumOffset = (endTime - startTime) / 2;
65
74
  const serverOffset = startTime + medianRumOffset;
66
75
 
@@ -97,6 +106,8 @@ class TimeKeeper {
97
106
 
98
107
  /** Process the session entity and use the info to set the main time calculations if present */
99
108
  processStoredDiff() {
109
+ if (this.#ready) return; // Time diff has already been calculated
110
+
100
111
  const storedServerTimeDiff = this.#session?.read()?.serverTimeDiff;
101
112
  if (typeof storedServerTimeDiff === 'number' && !isNaN(storedServerTimeDiff)) {
102
113
  this.#localTimeDiff = storedServerTimeDiff;
@@ -7,7 +7,6 @@ exports.fromArray = fromArray;
7
7
  exports.obj = obj;
8
8
  exports.param = param;
9
9
  exports.qs = qs;
10
- var _mapOwn = require("../util/map-own");
11
10
  var _stringify = require("../util/stringify");
12
11
  /*
13
12
  * Copyright 2020 New Relic Corporation. All rights reserved.
@@ -23,9 +22,7 @@ var charMap = {
23
22
  '%24': '$',
24
23
  '%3B': ';'
25
24
  };
26
- var charList = (0, _mapOwn.mapOwn)(charMap, function (k) {
27
- return k;
28
- });
25
+ var charList = Object.keys(charMap);
29
26
  var safeEncoded = new RegExp(charList.join('|'), 'g');
30
27
  function real(c) {
31
28
  return charMap[c];
@@ -48,7 +45,8 @@ function fromArray(qs, maxBytes) {
48
45
  function obj(payload, maxBytes) {
49
46
  var total = 0;
50
47
  var result = '';
51
- (0, _mapOwn.mapOwn)(payload, function (feature, dataArray) {
48
+ Object.entries(payload || {}).forEach(_ref => {
49
+ let [feature, dataArray] = _ref;
52
50
  var intermediate = [];
53
51
  var next;
54
52
  var i;
@@ -10,8 +10,7 @@ exports.warn = warn;
10
10
  * @param {*} [secondary] Secondary data to include, usually an error or object
11
11
  * @returns
12
12
  */
13
- function warn(message, secondary) {
14
- if (typeof console.warn !== 'function') return;
15
- console.warn("New Relic: ".concat(message));
16
- if (secondary) console.warn(secondary);
13
+ function warn(code, secondary) {
14
+ if (typeof console.debug !== 'function') return;
15
+ console.debug("New Relic Warning: https://github.com/newrelic/newrelic-browser-agent/blob/main/docs/warning-codes.md#".concat(code), secondary);
17
16
  }
@@ -54,15 +54,15 @@ function validateRules(rules) {
54
54
  var invalidRegexDetected = false;
55
55
  for (var i = 0; i < rules.length; i++) {
56
56
  if (!('regex' in rules[i])) {
57
- (0, _console.warn)('An obfuscation replacement rule was detected missing a "regex" value.');
57
+ (0, _console.warn)(12);
58
58
  invalidRegexDetected = true;
59
59
  } else if (typeof rules[i].regex !== 'string' && !(rules[i].regex instanceof RegExp)) {
60
- (0, _console.warn)('An obfuscation replacement rule contains a "regex" value with an invalid type (must be a string or RegExp)');
60
+ (0, _console.warn)(13);
61
61
  invalidRegexDetected = true;
62
62
  }
63
63
  var replacement = rules[i].replacement;
64
64
  if (replacement && typeof replacement !== 'string') {
65
- (0, _console.warn)('An obfuscation replacement rule contains a "replacement" value with an invalid type (must be a string)');
65
+ (0, _console.warn)(14);
66
66
  invalidReplacementDetected = true;
67
67
  }
68
68
  }
@@ -30,7 +30,6 @@ function getSubmitMethod() {
30
30
  return isFinalHarvest && _runtime.isBrowserScope && _runtime.supportsSendBeacon
31
31
  // Use sendBeacon for final harvest
32
32
  ? beacon
33
- // Only IE does not support sendBeacon for final harvest
34
33
  // If not final harvest, or not browserScope, always use xhr post
35
34
  : xhr;
36
35
  }
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.VitalMetric = void 0;
7
7
  class VitalMetric {
8
- #subscribers = new Set();
8
+ #subscribers = (() => new Set())();
9
9
  history = [];
10
10
  constructor(name, roundingMethod) {
11
11
  this.name = name;
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.scopedEE = scopedEE;
7
7
  exports.wrapLogger = wrapLogger;
8
- var _constants = require("../../features/logging/constants");
9
8
  var _contextualEe = require("../event-emitter/contextual-ee");
10
9
  var _eventContext = require("../event-emitter/event-context");
11
10
  var _console = require("../util/console");
@@ -28,7 +27,7 @@ var _wrapFunction = require("./wrap-function");
28
27
  */
29
28
  // eslint-disable-next-line
30
29
  function wrapLogger(sharedEE, parent, loggerFn, context) {
31
- if (!(typeof parent === 'object' && !!parent && typeof loggerFn === 'string' && !!loggerFn && typeof parent[loggerFn] === 'function')) return (0, _console.warn)(_constants.LOGGING_FAILURE_MESSAGE + 'invalid argument(s)');
30
+ if (!(typeof parent === 'object' && !!parent && typeof loggerFn === 'string' && !!loggerFn && typeof parent[loggerFn] === 'function')) return (0, _console.warn)(29);
32
31
  const ee = scopedEE(sharedEE);
33
32
  const wrapFn = (0, _wrapFunction.createWrapperWithEmitter)(ee);
34
33
 
@@ -56,7 +56,7 @@ function wrapXhr(sharedEE) {
56
56
  ee.emit('new-xhr', [xhr], context);
57
57
  xhr.addEventListener(READY_STATE_CHANGE, wrapXHR(context), (0, _eventListenerOpts.eventListenerOpts)(false));
58
58
  } catch (e) {
59
- (0, _console.warn)('An error occurred while intercepting XHR', e);
59
+ (0, _console.warn)(15, e);
60
60
  try {
61
61
  ee.emit('internal-error', [e]);
62
62
  } catch (err) {
@@ -24,7 +24,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
24
24
  */
25
25
 
26
26
  class Aggregate extends _aggregateBase.AggregateBase {
27
- static featureName = _constants.FEATURE_NAME;
27
+ static featureName = (() => _constants.FEATURE_NAME)();
28
28
  #agentInfo;
29
29
  #agentRuntime;
30
30
  #agentInit;
@@ -30,7 +30,7 @@ var handlersLen = handlers.length;
30
30
  var origRequest = _config.originals.REQ;
31
31
  var origXHR = _config.originals.XHR;
32
32
  class Instrument extends _instrumentBase.InstrumentBase {
33
- static featureName = _constants.FEATURE_NAME;
33
+ static featureName = (() => _constants.FEATURE_NAME)();
34
34
  constructor(agentIdentifier, aggregator) {
35
35
  let auto = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
36
36
  super(agentIdentifier, aggregator, _constants.FEATURE_NAME, auto);