@newrelic/browser-agent 1.237.0 → 1.238.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 (116) hide show
  1. package/dist/cjs/common/constants/env.cdn.js +1 -1
  2. package/dist/cjs/common/constants/env.npm.js +1 -1
  3. package/dist/cjs/common/deny-list/deny-list.js +1 -1
  4. package/dist/cjs/common/event-emitter/contextual-ee.js +18 -26
  5. package/dist/cjs/common/event-emitter/event-context.js +12 -0
  6. package/dist/cjs/common/harvest/harvest.js +4 -4
  7. package/dist/cjs/common/ids/bundle-id.js +19 -0
  8. package/dist/cjs/common/wrap/wrap-events.js +3 -2
  9. package/dist/cjs/common/wrap/wrap-fetch.js +1 -3
  10. package/dist/cjs/common/wrap/wrap-function.js +15 -46
  11. package/dist/cjs/common/wrap/wrap-mutation.js +1 -2
  12. package/dist/cjs/common/wrap/wrap-promise.js +2 -3
  13. package/dist/cjs/common/wrap/wrap-xhr.js +23 -27
  14. package/dist/cjs/features/ajax/instrument/distributed-tracing.js +0 -4
  15. package/dist/cjs/features/ajax/instrument/index.js +19 -9
  16. package/dist/cjs/features/metrics/aggregate/index.js +8 -0
  17. package/dist/cjs/features/session_replay/aggregate/index.js +2 -0
  18. package/dist/cjs/features/session_trace/aggregate/index.js +14 -8
  19. package/dist/cjs/features/spa/aggregate/index.js +1 -1
  20. package/dist/cjs/loaders/agent-base.js +12 -0
  21. package/dist/cjs/loaders/api/api.js +14 -1
  22. package/dist/cjs/loaders/api/interaction-types.js +11 -4
  23. package/dist/cjs/loaders/configure/configure.js +2 -1
  24. package/dist/esm/common/constants/env.cdn.js +1 -1
  25. package/dist/esm/common/constants/env.npm.js +1 -1
  26. package/dist/esm/common/deny-list/deny-list.js +1 -1
  27. package/dist/esm/common/event-emitter/contextual-ee.js +16 -23
  28. package/dist/esm/common/event-emitter/event-context.js +5 -0
  29. package/dist/esm/common/harvest/harvest.js +4 -4
  30. package/dist/esm/common/ids/bundle-id.js +13 -0
  31. package/dist/esm/common/wrap/wrap-events.js +4 -3
  32. package/dist/esm/common/wrap/wrap-fetch.js +2 -4
  33. package/dist/esm/common/wrap/wrap-function.js +15 -44
  34. package/dist/esm/common/wrap/wrap-mutation.js +2 -3
  35. package/dist/esm/common/wrap/wrap-promise.js +3 -4
  36. package/dist/esm/common/wrap/wrap-xhr.js +23 -27
  37. package/dist/esm/features/ajax/instrument/distributed-tracing.js +0 -4
  38. package/dist/esm/features/ajax/instrument/index.js +20 -10
  39. package/dist/esm/features/metrics/aggregate/index.js +8 -0
  40. package/dist/esm/features/session_replay/aggregate/index.js +2 -0
  41. package/dist/esm/features/session_trace/aggregate/index.js +14 -8
  42. package/dist/esm/features/spa/aggregate/index.js +1 -1
  43. package/dist/esm/loaders/agent-base.js +12 -0
  44. package/dist/esm/loaders/api/api.js +14 -1
  45. package/dist/esm/loaders/api/interaction-types.js +11 -4
  46. package/dist/esm/loaders/configure/configure.js +3 -2
  47. package/dist/types/common/event-emitter/contextual-ee.d.ts +22 -2
  48. package/dist/types/common/event-emitter/contextual-ee.d.ts.map +1 -1
  49. package/dist/types/common/event-emitter/event-context.d.ts +5 -0
  50. package/dist/types/common/event-emitter/event-context.d.ts.map +1 -0
  51. package/dist/types/common/event-emitter/register-handler.d.ts +1 -1
  52. package/dist/types/common/harvest/harvest.d.ts.map +1 -1
  53. package/dist/types/common/ids/bundle-id.d.ts +5 -0
  54. package/dist/types/common/ids/bundle-id.d.ts.map +1 -0
  55. package/dist/types/common/session/session-entity.d.ts +6 -6
  56. package/dist/types/common/window/nreum.d.ts +2 -2
  57. package/dist/types/common/wrap/wrap-events.d.ts.map +1 -1
  58. package/dist/types/common/wrap/wrap-fetch.d.ts.map +1 -1
  59. package/dist/types/common/wrap/wrap-function.d.ts +1 -19
  60. package/dist/types/common/wrap/wrap-function.d.ts.map +1 -1
  61. package/dist/types/common/wrap/wrap-mutation.d.ts.map +1 -1
  62. package/dist/types/common/wrap/wrap-promise.d.ts.map +1 -1
  63. package/dist/types/common/wrap/wrap-xhr.d.ts.map +1 -1
  64. package/dist/types/features/ajax/instrument/distributed-tracing.d.ts +1 -1
  65. package/dist/types/features/ajax/instrument/distributed-tracing.d.ts.map +1 -1
  66. package/dist/types/features/metrics/aggregate/endpoint-map.d.ts +5 -5
  67. package/dist/types/features/metrics/aggregate/index.d.ts.map +1 -1
  68. package/dist/types/features/session_replay/aggregate/index.d.ts.map +1 -1
  69. package/dist/types/features/session_trace/aggregate/index.d.ts +5 -0
  70. package/dist/types/features/session_trace/aggregate/index.d.ts.map +1 -1
  71. package/dist/types/loaders/agent-base.d.ts +9 -0
  72. package/dist/types/loaders/agent-base.d.ts.map +1 -1
  73. package/dist/types/loaders/api/api.d.ts +6 -0
  74. package/dist/types/loaders/api/api.d.ts.map +1 -1
  75. package/dist/types/loaders/api/interaction-types.d.ts +18 -7
  76. package/dist/types/loaders/api/interaction-types.d.ts.map +1 -1
  77. package/dist/types/loaders/configure/configure.d.ts +1 -0
  78. package/dist/types/loaders/configure/configure.d.ts.map +1 -1
  79. package/dist/types/loaders/features/features.d.ts +9 -9
  80. package/dist/types/loaders/micro-agent.d.ts +1 -1
  81. package/dist/types/loaders/micro-agent.d.ts.map +1 -1
  82. package/package.json +22 -27
  83. package/src/common/deny-list/deny-list.js +1 -1
  84. package/src/common/deny-list/deny-list.test.js +103 -30
  85. package/src/common/event-emitter/{contextual-ee.test.js → contextual-ee.component-test.js} +15 -32
  86. package/src/common/event-emitter/contextual-ee.js +20 -31
  87. package/src/common/event-emitter/event-context.js +5 -0
  88. package/src/common/harvest/harvest.js +4 -4
  89. package/src/common/harvest/harvest.test.js +1 -1
  90. package/src/common/ids/__mocks__/bundle-id.js +2 -0
  91. package/src/common/ids/__mocks__/unique-id.js +17 -0
  92. package/src/common/ids/bundle-id.js +13 -0
  93. package/src/common/url/__mocks__/parse-url.js +15 -0
  94. package/src/common/util/__mocks__/get-or-set.js +5 -0
  95. package/src/common/window/__mocks__/nreum.js +10 -0
  96. package/src/common/wrap/wrap-events.js +4 -3
  97. package/src/common/wrap/wrap-fetch.js +2 -4
  98. package/src/common/wrap/wrap-function.js +16 -44
  99. package/src/common/wrap/wrap-mutation.js +2 -3
  100. package/src/common/wrap/{wrap-promise.test.js → wrap-promise.component-test.js} +2 -32
  101. package/src/common/wrap/wrap-promise.js +3 -4
  102. package/src/common/wrap/wrap-xhr.js +24 -28
  103. package/src/features/ajax/instrument/distributed-tracing.js +0 -4
  104. package/src/features/ajax/instrument/distributed-tracing.test.js +375 -0
  105. package/src/features/ajax/instrument/index.js +22 -10
  106. package/src/features/metrics/aggregate/index.js +8 -0
  107. package/src/features/session_replay/aggregate/index.js +2 -0
  108. package/src/features/session_trace/aggregate/index.js +16 -7
  109. package/src/features/spa/aggregate/index.js +1 -1
  110. package/src/loaders/agent-base.js +12 -0
  111. package/src/loaders/api/api.component-test.js +45 -0
  112. package/src/loaders/api/api.js +14 -1
  113. package/src/loaders/api/interaction-types.js +11 -4
  114. package/src/loaders/configure/configure.js +11 -2
  115. /package/src/common/url/{encode.component-test.js → encode.test.js} +0 -0
  116. /package/src/common/url/{protocol.component-test.js → protocol.test.js} +0 -0
@@ -50,6 +50,18 @@ export class AgentBase {
50
50
  warn('Call to agent api setUserId failed. The js errors feature is not currently initialized.');
51
51
  }
52
52
 
53
+ /**
54
+ * Adds a user-defined application version string to subsequent events on the page.
55
+ * This decorates all payloads with an attribute of `application.version` which is queryable in NR1.
56
+ * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/setapplicationversion/}
57
+ * @param {string|null} value A string identifier for the application version, useful for
58
+ * tying all browser events to a specific release tag. The value parameter does not
59
+ * have to be unique. Passing a null value unsets any existing value.
60
+ */
61
+ setApplicationVersion(value) {
62
+ warn('Call to agent api setApplicationVersion failed. The agent is not currently initialized.');
63
+ }
64
+
53
65
  /**
54
66
  * Allows selective ignoring and grouping of known errors that the browser agent captures.
55
67
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/seterrorhandler/}
@@ -17,7 +17,7 @@ export const CUSTOM_ATTR_GROUP = 'CUSTOM/'; // the subgroup items should be stor
17
17
 
18
18
  export function setTopLevelCallers() {
19
19
  const nr = gosCDN();
20
- const funcs = ['setErrorHandler', 'finished', 'addToTrace', 'inlineHit', 'addRelease', 'addPageAction', 'setCurrentRouteName', 'setPageViewName', 'setCustomAttribute', 'interaction', 'noticeError', 'setUserId'];
20
+ const funcs = ['setErrorHandler', 'finished', 'addToTrace', 'inlineHit', 'addRelease', 'addPageAction', 'setCurrentRouteName', 'setPageViewName', 'setCustomAttribute', 'interaction', 'noticeError', 'setUserId', 'setApplicationVersion'];
21
21
  funcs.forEach(f => {
22
22
  nr[f] = function () {
23
23
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -106,6 +106,19 @@ export function setAPI(agentIdentifier, forceDrain) {
106
106
  }
107
107
  return appendJsAttribute('enduser.id', value, 'setUserId', true);
108
108
  };
109
+
110
+ /**
111
+ * Attach the 'applcation.version' attribute onto agent payloads. This may be used in NR queries to group all browser events by a specific customer-defined release.
112
+ * @param {string|null} value - Application version -- if null, will "unset" the value
113
+ * @returns @see apiCall
114
+ */
115
+ apiInterface.setApplicationVersion = function (value) {
116
+ if (!(typeof value === 'string' || value === null)) {
117
+ warn("Failed to execute setApplicationVersion. Expected <String | null>, but got <".concat(typeof value, ">."));
118
+ return;
119
+ }
120
+ return appendJsAttribute('application.version', value, 'setApplicationVersion', false);
121
+ };
109
122
  apiInterface.interaction = function () {
110
123
  return new InteractionHandle().get();
111
124
  };
@@ -6,7 +6,7 @@
6
6
  * @property {getContext} getContext
7
7
  * @property {ignore} ignore
8
8
  * @property {onEnd} onEnd
9
- * @property {onEnd} save
9
+ * @property {save} save
10
10
  * @property {setAttribute} setAttribute
11
11
  * @property {setName} setName
12
12
  */
@@ -24,8 +24,8 @@
24
24
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/createtracer/}
25
25
  * @callback createTracer
26
26
  * @param {string} name This will be used as the name of the tracer.
27
- * @param {string} [callback] A callback that contains the synchronous work to run at the end of the async work. To execute this callback, call the wrapper function returned using createTracer().
28
- * @returns {Function} Returns a method that wraps the original callback. When this method is invoked, it calls the original callback and ends the async timing.
27
+ * @param {(...args: any[]) => any} [callback] A callback that contains the synchronous work to run at the end of the async work. To execute this callback, call the wrapper function returned using createTracer().
28
+ * @returns {(...args: any[]) => any} Returns a method that wraps the original callback. When this method is invoked, it calls the original callback and ends the async timing.
29
29
  */
30
30
 
31
31
  /**
@@ -43,6 +43,13 @@
43
43
  * @returns {InteractionInstance} Returns the same interaction object allowing method chaining.
44
44
  */
45
45
 
46
+ /**
47
+ * Overrides other SPA save() calls; ignores an interaction so it is not saved or sent to New Relic.
48
+ * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/ignore/}
49
+ * @callback ignore
50
+ * @returns {InteractionInstance} Returns the same interaction object allowing method chaining.
51
+ */
52
+
46
53
  /**
47
54
  * Change the values associated with a SPA interaction before the interaction is saved.
48
55
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/onend/}
@@ -63,7 +70,7 @@
63
70
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/setattribute/}
64
71
  * @callback setAttribute
65
72
  * @param {string} key Used as the attribute name on the BrowserInteraction event.
66
- * @param {any} key Used as the attribute value on the BrowserInteraction event. This can be a string, number, boolean, or object. If it is an object, New Relic serializes it to a JSON string.
73
+ * @param {any} value Used as the attribute value on the BrowserInteraction event. This can be a string, number, boolean, or object. If it is an object, New Relic serializes it to a JSON string.
67
74
  * @returns {InteractionInstance} Returns the same interaction object allowing method chaining.
68
75
  */
69
76
 
@@ -1,6 +1,6 @@
1
1
  import { setAPI, setTopLevelCallers } from '../api/api';
2
2
  import { addToNREUM, gosCDN, gosNREUMInitializedAgents } from '../../common/window/nreum';
3
- import { setConfiguration, setInfo, setLoaderConfig, setRuntime } from '../../common/config/config';
3
+ import { getConfiguration, setConfiguration, setInfo, setLoaderConfig, setRuntime } from '../../common/config/config';
4
4
  import { activatedFeatures } from '../../common/util/feature-flags';
5
5
  import { isWorkerScope } from '../../common/constants/runtime';
6
6
  export function configure(agentIdentifier) {
@@ -30,7 +30,8 @@ export function configure(agentIdentifier) {
30
30
  info.jsAttributes.isWorker = true;
31
31
  }
32
32
  setInfo(agentIdentifier, info);
33
- runtime.denyList = init.ajax?.block_internal ? (init.ajax.deny_list || []).concat(info.beacon, info.errorBeacon) : init.ajax?.deny_list;
33
+ const updatedInit = getConfiguration(agentIdentifier);
34
+ runtime.denyList = [...(updatedInit.ajax?.deny_list || []), ...(updatedInit.ajax?.block_internal ? [info.beacon, info.errorBeacon] : [])];
34
35
  setRuntime(agentIdentifier, runtime);
35
36
  setTopLevelCallers();
36
37
  const api = setAPI(agentIdentifier, forceDrain);
@@ -1,4 +1,24 @@
1
- export function getOrSetContext(obj: any): any;
1
+ declare namespace globalInstance {
2
+ export { addEventListener as on };
3
+ export { addEventListener };
4
+ export { removeEventListener };
5
+ export { emit };
6
+ export { getOrCreate as get };
7
+ export { listeners };
8
+ export { context };
9
+ export { bufferEventsByGroup as buffer };
10
+ export { abort };
11
+ export const aborted: boolean;
12
+ export { isBuffering };
13
+ export { debugId };
14
+ export const backlog: any;
15
+ }
16
+ export const contextId: string;
17
+ declare function emit(type: any, args: any, contextOrStore: any, force: any, bubble: any): any;
18
+ declare function getOrCreate(name: any): any;
19
+ declare function listeners(type: any): any;
20
+ declare function bufferEventsByGroup(types: any, group: any): void;
21
+ declare function abort(): void;
22
+ declare function isBuffering(type: any): boolean;
2
23
  export { globalInstance as ee };
3
- declare var globalInstance: any;
4
24
  //# sourceMappingURL=contextual-ee.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contextual-ee.d.ts","sourceRoot":"","sources":["../../../../src/common/event-emitter/contextual-ee.js"],"names":[],"mappings":"AAmJA,+CAEC;;AAvID,gCAAkB"}
1
+ {"version":3,"file":"contextual-ee.d.ts","sourceRoot":"","sources":["../../../../src/common/event-emitter/contextual-ee.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAYA,+BAA0C;AA0DxC,+FAsBC;AAqBD,6CAEC;AAND,2CAEC;AAMD,mEAaC;AAcH,+BAGC;AAfC,iDAGC"}
@@ -0,0 +1,5 @@
1
+ export class EventContext {
2
+ constructor(contextId: any);
3
+ contextId: any;
4
+ }
5
+ //# sourceMappingURL=event-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-context.d.ts","sourceRoot":"","sources":["../../../../src/common/event-emitter/event-context.js"],"names":[],"mappings":"AAAA;IACE,4BAEC;IADC,eAA0B;CAE7B"}
@@ -1,7 +1,7 @@
1
1
  export function defaultRegister(type: any, handler: any, group: any, ee: any): void;
2
2
  export namespace defaultRegister {
3
3
  export { registerWithSpecificEmitter as on };
4
- export let handlers: {};
4
+ export const handlers: {};
5
5
  }
6
6
  export { defaultRegister as registerHandler };
7
7
  declare function registerWithSpecificEmitter(ee: any, handlers: any, type: any, handler: any, group: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"harvest.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/harvest.js"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH;IAII,0BAA2H;IAC3H,uBAAoD;IACpD,kCAAsH;IAEtH,YAAiB;IAGnB;;;;;OAKG;IACH,aAFW,eAAe,WAUzB;IAED;;;OAGG;IACH,YAFW,eAAe,WAMzB;IAED;;;OAGG;IACH,wBAFW,eAAe,WAMzB;IAED;;;;;;OAMG;IACH,gGAJW,eAAe,GACb,OAAO,CAmFnB;IAGD,0BAmBC;IAED;;;;;;;OAOG;IACH,wBALW,yBAAyB,WACzB,6BAA6B,GAE3B,cAAc,CA2B1B;IAED;;;;;;;OAOG;IACH,uBAHW,cAAc,GACZ,cAAc,CAwB1B;IAED;;;;;OAKG;IACH,aAHW,yBAAyB,YACzB,sBAAsB,QAQhC;CACF;8BApPY,OAAO,YAAY,EAAE,eAAe;wCACpC,OAAO,YAAY,EAAE,yBAAyB;6BAC9C,OAAO,YAAY,EAAE,cAAc;qCACnC,OAAO,YAAY,EAAE,sBAAsB;4CAC3C,OAAO,YAAY,EAAE,6BAA6B;8BAZjC,2BAA2B;2BAF9B,mBAAmB"}
1
+ {"version":3,"file":"harvest.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/harvest.js"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH;IAII,0BAA2H;IAC3H,uBAAoD;IACpD,kCAAsH;IAEtH,YAAiB;IAGnB;;;;;OAKG;IACH,aAFW,eAAe,WAWzB;IAED;;;OAGG;IACH,YAFW,eAAe,WAMzB;IAED;;;OAGG;IACH,wBAFW,eAAe,WAMzB;IAED;;;;;;OAMG;IACH,gGAJW,eAAe,GACb,OAAO,CAmFnB;IAGD,0BAmBC;IAED;;;;;;;OAOG;IACH,wBALW,yBAAyB,WACzB,6BAA6B,GAE3B,cAAc,CA2B1B;IAED;;;;;;;OAOG;IACH,uBAHW,cAAc,GACZ,cAAc,CAuB1B;IAED;;;;;OAKG;IACH,aAHW,yBAAyB,YACzB,sBAAsB,QAQhC;CACF;8BApPY,OAAO,YAAY,EAAE,eAAe;wCACpC,OAAO,YAAY,EAAE,yBAAyB;6BAC9C,OAAO,YAAY,EAAE,cAAc;qCACnC,OAAO,YAAY,EAAE,sBAAsB;4CAC3C,OAAO,YAAY,EAAE,6BAA6B;8BAZjC,2BAA2B;2BAF9B,mBAAmB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Provides a unique id for the current agent bundle
3
+ */
4
+ export const bundleId: string;
5
+ //# sourceMappingURL=bundle-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-id.d.ts","sourceRoot":"","sources":["../../../../src/common/ids/bundle-id.js"],"names":[],"mappings":"AASA;;GAEG;AACH,8BAAsC"}
@@ -1,12 +1,12 @@
1
1
  export namespace MODE {
2
- let OFF: number;
3
- let FULL: number;
4
- let ERROR: number;
2
+ const OFF: number;
3
+ const FULL: number;
4
+ const ERROR: number;
5
5
  }
6
6
  export namespace SESSION_EVENTS {
7
- let PAUSE: string;
8
- let RESET: string;
9
- let RESUME: string;
7
+ const PAUSE: string;
8
+ const RESET: string;
9
+ const RESUME: string;
10
10
  }
11
11
  export class SessionEntity {
12
12
  /**
@@ -8,7 +8,7 @@ export function addToNREUM(fnName: any, fn: any): void;
8
8
  export function NREUMinitialized(): void;
9
9
  export function gosCDN(): any;
10
10
  export namespace defaults {
11
- let beacon: string;
12
- let errorBeacon: string;
11
+ const beacon: string;
12
+ const errorBeacon: string;
13
13
  }
14
14
  //# sourceMappingURL=nreum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wrap-events.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-events.js"],"names":[],"mappings":"AAmBA;;;;;;GAMG;AACH,qCAJW,MAAM,GAEJ,MAAM,CAyDlB;AAeD;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
1
+ {"version":3,"file":"wrap-events.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-events.js"],"names":[],"mappings":"AAoBA;;;;;;GAMG;AACH,qCAJW,MAAM,GAEJ,MAAM,CAyDlB;AAeD;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"wrap-fetch.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-fetch.js"],"names":[],"mappings":"AAsBA;;;;;;;GAOG;AACH,oCAJW,MAAM,GAEJ,MAAM,CAqElB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
1
+ {"version":3,"file":"wrap-fetch.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-fetch.js"],"names":[],"mappings":"AAoBA;;;;;;;GAOG;AACH,oCAJW,MAAM,GAEJ,MAAM,CAqElB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
@@ -5,24 +5,6 @@
5
5
  * @returns {function} The wrapped function.
6
6
  */
7
7
  export function createWrapperWithEmitter(emitter?: Object | undefined, always: boolean): Function;
8
- /**
9
- * Creates a wrapped version of a function using a specified wrapper function. The new wrapped function references the
10
- * original function. Also copies the properties of the original function to the wrapped function.
11
- * @param {function} fn - A function to be wrapped.
12
- * @param {function} wrapper - A higher order function that returns a new function, which executes the function passed
13
- * to the higher order function as an argument.
14
- * @returns {function} A wrapped function with an internal reference to the original function.
15
- */
16
- export function wrapFunction(fn: Function, wrapper: Function): Function;
17
- /**
18
- * Replaces a function with a wrapped version of itself. To preserve object references, rather than taking the function
19
- * itself as an argument, takes the object on which the particular named function is a property.
20
- * @param {Object} obj - The object on which the named function is a property.
21
- * @param {string} fnName - The name of the function to be wrapped.
22
- * @param {function} wrapper - A higher order function that returns a new function, which executes the function passed
23
- * to the higher order function as an argument.
24
- */
25
- export function wrapInPlace(obj: Object, fnName: string, wrapper: Function): void;
26
- export const flag: "nr@original";
8
+ export const flag: string;
27
9
  export default createWrapperWithEmitter;
28
10
  //# sourceMappingURL=wrap-function.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wrap-function.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-function.js"],"names":[],"mappings":"AA0BA;;;;;GAKG;AACH,+EAHW,OAAO,YAkIjB;AA6DD;;;;;;;GAOG;AACH,wEAKC;AAED;;;;;;;GAOG;AACH,iCALW,MAAM,UACN,MAAM,2BAOhB;AA7OD,iCAAiC"}
1
+ {"version":3,"file":"wrap-function.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-function.js"],"names":[],"mappings":"AA4BA;;;;;GAKG;AACH,+EAHW,OAAO,YAgIjB;AApJD,0BAA6C"}
@@ -1 +1 @@
1
- {"version":3,"file":"wrap-mutation.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-mutation.js"],"names":[],"mappings":"AAgBA;;;;;GAKG;AACH,uCAHW,MAAM,GACJ,MAAM,CA0BlB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
1
+ {"version":3,"file":"wrap-mutation.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-mutation.js"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH,uCAHW,MAAM,GACJ,MAAM,CA0BlB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"wrap-promise.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-promise.js"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AACH,sCAHW,MAAM,GACJ,MAAM,CAqIlB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
1
+ {"version":3,"file":"wrap-promise.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-promise.js"],"names":[],"mappings":"AAeA;;;;;;GAMG;AACH,sCAHW,MAAM,GACJ,MAAM,CAqIlB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"wrap-xhr.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-xhr.js"],"names":[],"mappings":"AAoBA;;;;;GAKG;AAEH,kCAJW,MAAM,GACJ,MAAM,CAkLlB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
1
+ {"version":3,"file":"wrap-xhr.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-xhr.js"],"names":[],"mappings":"AAmBA;;;;;GAKG;AAEH,kCAJW,MAAM,GACJ,MAAM,CA+KlB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
@@ -6,10 +6,10 @@ export class DT {
6
6
  traceId: string;
7
7
  timestamp: number;
8
8
  } | null;
9
- shouldGenerateTrace(parsedOrigin: any): boolean;
10
9
  generateTraceContextParentHeader(spanId: any, traceId: any): string;
11
10
  generateTraceContextStateHeader(spanId: any, timestamp: any, accountId: any, appId: any, trustKey: any): string;
12
11
  generateTraceHeader(spanId: any, traceId: any, timestamp: any, accountId: any, appId: any, trustKey: any): string | null;
12
+ shouldGenerateTrace(parsedOrigin: any): boolean;
13
13
  isAllowedOrigin(parsedOrigin: any): boolean;
14
14
  isDtEnabled(): boolean;
15
15
  excludeNewrelicHeader(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"distributed-tracing.d.ts","sourceRoot":"","sources":["../../../../../src/features/ajax/instrument/distributed-tracing.js"],"names":[],"mappings":"AAUA;IACE,kCAMC;IALC,qBAAsC;IAOxC;;;;aA0CC;IA2CD,gDAEC;IA3CD,oEAEC;IAED,gHASC;IAED,yHAsBC;IAQD,4CAuBC;IAED,uBAMC;IAGD,iCAMC;IAED,oCAMC;IAED,yCAMC;CACF"}
1
+ {"version":3,"file":"distributed-tracing.d.ts","sourceRoot":"","sources":["../../../../../src/features/ajax/instrument/distributed-tracing.js"],"names":[],"mappings":"AAUA;IACE,kCAEC;IADC,qBAAsC;IAGxC;;;;aA0CC;IAED,oEAEC;IAED,gHASC;IAED,yHAsBC;IAID,gDAEC;IAED,4CAuBC;IAED,uBAMC;IAGD,iCAMC;IAED,oCAMC;IAED,yCAMC;CACF"}
@@ -1,8 +1,8 @@
1
1
  export namespace endpointMap {
2
- let rum: string;
3
- let events: string;
4
- let ins: string;
5
- let jserrors: string;
6
- let resources: string;
2
+ const rum: string;
3
+ const events: string;
4
+ const ins: string;
5
+ const jserrors: string;
6
+ const resources: string;
7
7
  }
8
8
  //# sourceMappingURL=endpoint-map.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/metrics/aggregate/index.js"],"names":[],"mappings":"AAiBA;IACE,2BAAiC;IACjC,mDAsBC;IAED,wDAKC;IAED,iDAKC;IAED,qBA+BC;IAED,0BAQC;IAED,eAoDC;IA5CG,mCAAyB;CA6C9B;8BA5I6B,4BAA4B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/metrics/aggregate/index.js"],"names":[],"mappings":"AAiBA;IACE,2BAAiC;IACjC,mDAsBC;IAED,wDAKC;IAED,iDAKC;IAED,qBA+BC;IAED,0BAQC;IAED,eA4DC;IApDG,mCAAyB;CAqD9B;8BApJ6B,4BAA4B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/aggregate/index.js"],"names":[],"mappings":"AAwBA,4CAA4C;AAE5C,mCAAmC;AAInC,uCAAuC;AACvC,uCAAuC;AACvC,iCAAiC;AACjC,uCAAuC;AAIvC;IACE,2BAAiC;IACjC,mDA4FC;IA1FC,iHAAiH;IACjH,cAAgB;IAChB,8GAA8G;IAC9G,wBAAgH;IAChH,iFAAiF;IACjF,qBAAwB;IACxB,mEAAmE;IACnE,sBAAyB;IACzB,6GAA6G;IAC7G,aAAoB;IAGpB,iEAAiE;IACjE,mBAAsB;IACtB,gDAAgD;IAChD,wBAA0B;IAE1B,gGAAgG;IAChG,sBAAyB;IACzB;;;MAGE;IACF,qBAAwB;IACxB,+HAA+H;IAC/H,kBAAqB;IAErB,oHAAoH;IACpH;;;MAAsD;IAEtD,qGAAqG;IACrG,+BAA+B;IAO/B,uIAAuI;IACvI,0BAAyE;IAiBvE,wCAKQ;IA+BZ;;;;;;OAMG;IACH,kCALW,OAAO,eACP,OAAO,cACP,OAAO,GACL,IAAI,CAuDhB;IAED;;;;;;;;;oBAaC;IAED;;;;;;;;;MAyBC;IAED,qCAOC;IAED,kFAAkF;IAClF,oBAOC;IAED,qDAAqD;IACrD,uBAyBC;IAED,yHAAyH;IACzH,yCA8BC;IAED,0HAA0H;IAC1H,yBAGC;IAED,qCAIC;IAED,wBAEC;IAED,gCAAgC;IAChC,uCAGC;IAED,yDAAyD;IACzD,cAOC;IAED;;;SAGK;IACL,oCAGC;IAED,yCAGC;CACF;8BAvV6B,4BAA4B;iCALzB,2CAA2C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/aggregate/index.js"],"names":[],"mappings":"AAwBA,4CAA4C;AAE5C,mCAAmC;AAInC,uCAAuC;AACvC,uCAAuC;AACvC,iCAAiC;AACjC,uCAAuC;AAIvC;IACE,2BAAiC;IACjC,mDA4FC;IA1FC,iHAAiH;IACjH,cAAgB;IAChB,8GAA8G;IAC9G,wBAAgH;IAChH,iFAAiF;IACjF,qBAAwB;IACxB,mEAAmE;IACnE,sBAAyB;IACzB,6GAA6G;IAC7G,aAAoB;IAGpB,iEAAiE;IACjE,mBAAsB;IACtB,gDAAgD;IAChD,wBAA0B;IAE1B,gGAAgG;IAChG,sBAAyB;IACzB;;;MAGE;IACF,qBAAwB;IACxB,+HAA+H;IAC/H,kBAAqB;IAErB,oHAAoH;IACpH;;;MAAsD;IAEtD,qGAAqG;IACrG,+BAA+B;IAO/B,uIAAuI;IACvI,0BAAyE;IAiBvE,wCAKQ;IA+BZ;;;;;;OAMG;IACH,kCALW,OAAO,eACP,OAAO,cACP,OAAO,GACL,IAAI,CAyDhB;IAED;;;;;;;;;oBAaC;IAED;;;;;;;;;MAyBC;IAED,qCAOC;IAED,kFAAkF;IAClF,oBAOC;IAED,qDAAqD;IACrD,uBAyBC;IAED,yHAAyH;IACzH,yCA8BC;IAED,0HAA0H;IAC1H,yBAGC;IAED,qCAIC;IAED,wBAEC;IAED,gCAAgC;IAChC,uCAGC;IAED,yDAAyD;IACzD,cAOC;IAED;;;SAGK;IACL,oCAGC;IAED,yCAGC;CACF;8BAzV6B,4BAA4B;iCALzB,2CAA2C"}
@@ -9,7 +9,11 @@ export class Aggregate extends AggregateBase {
9
9
  sentTrace: {} | null | undefined;
10
10
  harvestTimeSeconds: any;
11
11
  maxNodesPerHarvest: any;
12
+ /**
13
+ * Standalone (mode) refers to the legacy version of ST before the idea of 'session' or the Replay feature existed.
14
+ * It has some different behavior vs when used in tandem with replay. */
12
15
  isStandalone: boolean | undefined;
16
+ operationalGate: HandlerCache | undefined;
13
17
  startTracing(startupBuffer: any, dontStartHarvestYet?: boolean): void;
14
18
  processPVT(name: any, value: any, attrs: any): void;
15
19
  storeTiming(timingEntry: any): void;
@@ -43,4 +47,5 @@ export class Aggregate extends AggregateBase {
43
47
  #private;
44
48
  }
45
49
  import { AggregateBase } from '../../utils/aggregate-base';
50
+ import { HandlerCache } from '../../utils/handler-cache';
46
51
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_trace/aggregate/index.js"],"names":[],"mappings":"AAkCA;IACE,2BAAiC;IAGjC,iEAqHC;IAnHC,kBAA+C;IAK/C,sBAAiD;IACjD,yBAAc;IACd,sBAAe;IACf,8BAAkB;IAClB,iCAAqB;IACrB,wBAA0G;IAC1G,wBAA4G;IAC5G,kCAAyB;IAyG3B,sEAcC;IA4CD,oDAOC;IAGD,oCAwBC;IAGD,uEAkBC;IAED,oDAMC;IAED,wBAwBC;IAED,uCAuBC;IAGD,gDASC;IAID,qCAkBC;IAGD,qEAUC;IAGD,mEAUC;IAGD,yBAWC;IAED;;;;OAIG;IACH,2BAHW,MAAM,GACJ,MAAM,CAsBlB;IAGD;;;;;;;;;;MAwBC;IAED,mEA8BC;;CACF;8BA5d6B,4BAA4B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_trace/aggregate/index.js"],"names":[],"mappings":"AAkCA;IACE,2BAAiC;IAGjC,iEAyHC;IAvHC,kBAA+C;IAK/C,sBAAiD;IACjD,yBAAc;IACd,sBAAe;IACf,8BAAkB;IAClB,iCAAqB;IACrB,wBAA0G;IAC1G,wBAA4G;IAC5G;;4EAEwE;IACxE,kCAAyB;IAGzB,0CAAsC;IAuGxC,sEAcC;IA6CD,oDAOC;IAGD,oCAwBC;IAGD,uEAkBC;IAED,oDAMC;IAED,wBAwBC;IAED,uCAuBC;IAGD,gDASC;IAID,qCAkBC;IAGD,qEAUC;IAGD,mEAUC;IAGD,yBAeC;IAED;;;;OAIG;IACH,2BAHW,MAAM,GACJ,MAAM,CAsBlB;IAGD;;;;;;;;;;MAwBC;IAED,mEA8BC;;CACF;8BAre6B,4BAA4B;6BAH7B,2BAA2B"}
@@ -34,6 +34,15 @@ export class AgentBase {
34
34
  * @param {string|null} value A string identifier for the end-user, useful for tying all browser events to specific users. The value parameter does not have to be unique. If IDs should be unique, the caller is responsible for that validation. Passing a null value unsets any existing user ID.
35
35
  */
36
36
  setUserId(value: string | null): void;
37
+ /**
38
+ * Adds a user-defined application version string to subsequent events on the page.
39
+ * This decorates all payloads with an attribute of `application.version` which is queryable in NR1.
40
+ * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/setapplicationversion/}
41
+ * @param {string|null} value A string identifier for the application version, useful for
42
+ * tying all browser events to a specific release tag. The value parameter does not
43
+ * have to be unique. Passing a null value unsets any existing value.
44
+ */
45
+ setApplicationVersion(value: string | null): void;
37
46
  /**
38
47
  * Allows selective ignoring and grouping of known errors that the browser agent captures.
39
48
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/seterrorhandler/}
@@ -1 +1 @@
1
- {"version":3,"file":"agent-base.d.ts","sourceRoot":"","sources":["../../../src/loaders/agent-base.js"],"names":[],"mappings":"AAEA;IACE;;;;;OAKG;IACH,oBAHW,MAAM,yCAKhB;IAED;;;;;OAKG;IACH,sBAHW,MAAM,mCAKhB;IAED;;;;;;OAMG;IACH,yBAJW,MAAM,SACN,MAAM,GAAC,MAAM,GAAC,IAAI,uCAK5B;IAED;;;;;OAKG;IACH,mBAHW,KAAK,GAAC,MAAM,+CAKtB;IAED;;;;OAIG;IACH,iBAFW,MAAM,GAAC,IAAI,QAIrB;IAED;;;;OAIG;IACH,kCAFmB,KAAK,GAAC,MAAM,KAAK,OAAO,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,QAI9D;IAED;;;;OAIG;IACH,+CAEC;IAED;;;;;OAKG;IACH,iBAHW,MAAM,MACN,MAAM,QAIhB;CACF"}
1
+ {"version":3,"file":"agent-base.d.ts","sourceRoot":"","sources":["../../../src/loaders/agent-base.js"],"names":[],"mappings":"AAEA;IACE;;;;;OAKG;IACH,oBAHW,MAAM,yCAKhB;IAED;;;;;OAKG;IACH,sBAHW,MAAM,mCAKhB;IAED;;;;;;OAMG;IACH,yBAJW,MAAM,SACN,MAAM,GAAC,MAAM,GAAC,IAAI,uCAK5B;IAED;;;;;OAKG;IACH,mBAHW,KAAK,GAAC,MAAM,+CAKtB;IAED;;;;OAIG;IACH,iBAFW,MAAM,GAAC,IAAI,QAIrB;IAED;;;;;;;OAOG;IACH,6BAJW,MAAM,GAAC,IAAI,QAMrB;IAED;;;;OAIG;IACH,kCAFmB,KAAK,GAAC,MAAM,KAAK,OAAO,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,QAI9D;IAED;;;;OAIG;IACH,+CAEC;IAED;;;;;OAKG;IACH,iBAHW,MAAM,MACN,MAAM,QAIhB;CACF"}
@@ -10,6 +10,12 @@ export function setAPI(agentIdentifier: any, forceDrain: any): {
10
10
  * @returns @see apiCall
11
11
  */
12
12
  setUserId(value: string): any;
13
+ /**
14
+ * Attach the 'applcation.version' attribute onto agent payloads. This may be used in NR queries to group all browser events by a specific customer-defined release.
15
+ * @param {string|null} value - Application version -- if null, will "unset" the value
16
+ * @returns @see apiCall
17
+ */
18
+ setApplicationVersion(value: string | null): any;
13
19
  interaction(): any;
14
20
  noticeError(err: any, customAttributes: any): void;
15
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/loaders/api/api.js"],"names":[],"mappings":"AAkBA,2CAoBC;AAED;;;;;IA0DE;;;;OAIG;qBAFQ,MAAM;;;EAuElB;AA3JD,0CAA0C"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/loaders/api/api.js"],"names":[],"mappings":"AAkBA,2CAoBC;AAED;;;;;IA0DE;;;;OAIG;qBAFQ,MAAM;IAWjB;;;;OAIG;iCAFQ,MAAM,GAAC,IAAI;;;EAuEvB;AAxKD,0CAA0C"}
@@ -6,7 +6,7 @@
6
6
  * @property {getContext} getContext
7
7
  * @property {ignore} ignore
8
8
  * @property {onEnd} onEnd
9
- * @property {onEnd} save
9
+ * @property {save} save
10
10
  * @property {setAttribute} setAttribute
11
11
  * @property {setName} setName
12
12
  */
@@ -22,8 +22,8 @@
22
22
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/createtracer/}
23
23
  * @callback createTracer
24
24
  * @param {string} name This will be used as the name of the tracer.
25
- * @param {string} [callback] A callback that contains the synchronous work to run at the end of the async work. To execute this callback, call the wrapper function returned using createTracer().
26
- * @returns {Function} Returns a method that wraps the original callback. When this method is invoked, it calls the original callback and ends the async timing.
25
+ * @param {(...args: any[]) => any} [callback] A callback that contains the synchronous work to run at the end of the async work. To execute this callback, call the wrapper function returned using createTracer().
26
+ * @returns {(...args: any[]) => any} Returns a method that wraps the original callback. When this method is invoked, it calls the original callback and ends the async timing.
27
27
  */
28
28
  /**
29
29
  * Ends the SPA interaction at the current time.
@@ -38,6 +38,12 @@
38
38
  * @param {(ctx: object) => void} callback This function is called when the interaction ends. It is called with one parameter, which is the interaction context.
39
39
  * @returns {InteractionInstance} Returns the same interaction object allowing method chaining.
40
40
  */
41
+ /**
42
+ * Overrides other SPA save() calls; ignores an interaction so it is not saved or sent to New Relic.
43
+ * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/ignore/}
44
+ * @callback ignore
45
+ * @returns {InteractionInstance} Returns the same interaction object allowing method chaining.
46
+ */
41
47
  /**
42
48
  * Change the values associated with a SPA interaction before the interaction is saved.
43
49
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/onend/}
@@ -56,7 +62,7 @@
56
62
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/setattribute/}
57
63
  * @callback setAttribute
58
64
  * @param {string} key Used as the attribute name on the BrowserInteraction event.
59
- * @param {any} key Used as the attribute value on the BrowserInteraction event. This can be a string, number, boolean, or object. If it is an object, New Relic serializes it to a JSON string.
65
+ * @param {any} value Used as the attribute value on the BrowserInteraction event. This can be a string, number, boolean, or object. If it is an object, New Relic serializes it to a JSON string.
60
66
  * @returns {InteractionInstance} Returns the same interaction object allowing method chaining.
61
67
  */
62
68
  /**
@@ -75,7 +81,7 @@ export type InteractionInstance = {
75
81
  getContext: getContext;
76
82
  ignore: ignore;
77
83
  onEnd: onEnd;
78
- save: onEnd;
84
+ save: save;
79
85
  setAttribute: setAttribute;
80
86
  setName: setName;
81
87
  };
@@ -88,7 +94,7 @@ export type actionText = (value: string) => InteractionInstance;
88
94
  * Times sub-components of a SPA interaction separately, including wait time and JS execution time.
89
95
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/createtracer/}
90
96
  */
91
- export type createTracer = (name: string, callback?: string | undefined) => Function;
97
+ export type createTracer = (name: string, callback?: ((...args: any[]) => any) | undefined) => (...args: any[]) => any;
92
98
  /**
93
99
  * Ends the SPA interaction at the current time.
94
100
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/end/}
@@ -99,6 +105,11 @@ export type end = () => InteractionInstance;
99
105
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/getcontext/}
100
106
  */
101
107
  export type getContext = (callback: (ctx: object) => void) => InteractionInstance;
108
+ /**
109
+ * Overrides other SPA save() calls; ignores an interaction so it is not saved or sent to New Relic.
110
+ * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/ignore/}
111
+ */
112
+ export type ignore = () => InteractionInstance;
102
113
  /**
103
114
  * Change the values associated with a SPA interaction before the interaction is saved.
104
115
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/onend/}
@@ -113,7 +124,7 @@ export type save = () => InteractionInstance;
113
124
  * Adds a custom SPA attribute only to the current interaction in browser.
114
125
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/setattribute/}
115
126
  */
116
- export type setAttribute = (key: string, key: any) => InteractionInstance;
127
+ export type setAttribute = (key: string, value: any) => InteractionInstance;
117
128
  /**
118
129
  * Sets the name and trigger of a SPA's browser interaction that is not a route change or URL change.
119
130
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/setname/}
@@ -1 +1 @@
1
- {"version":3,"file":"interaction-types.d.ts","sourceRoot":"","sources":["../../../../src/loaders/api/interaction-types.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;;GAMG;AAEH;;;;;;;GAOG;AAEH;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;;;;;;GAOG;AAEH;;;;;;;GAOG;AAGH,wBAAwB;;gBA7EV,UAAU;kBACV,YAAY;SACZ,GAAG;gBACH,UAAU;;WAEV,KAAK;UACL,KAAK;kBACL,YAAY;aACZ,OAAO;;;;;;iCAOV,MAAM,KACJ,mBAAmB;;;;;kCAOrB,MAAM;;;;;wBASJ,mBAAmB;;;;;0CAOf,MAAM,KAAK,IAAI,KACnB,mBAAmB;;;;;qCAOf,MAAM,KAAK,IAAI,KACnB,mBAAmB;;;;;yBAOnB,mBAAmB;;;;;iCAOrB,MAAM,OACN,GAAG,KACD,mBAAmB;;;;;6BAOrB,MAAM,mCAEJ,mBAAmB"}
1
+ {"version":3,"file":"interaction-types.d.ts","sourceRoot":"","sources":["../../../../src/loaders/api/interaction-types.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;;GAMG;AAEH;;;;;;;GAOG;AAEH;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;;;;;;GAOG;AAEH;;;;;;;GAOG;AAGH,wBAAwB;;gBApFV,UAAU;kBACV,YAAY;SACZ,GAAG;gBACH,UAAU;YACV,MAAM;WACN,KAAK;UACL,IAAI;kBACJ,YAAY;aACZ,OAAO;;;;;;iCAOV,MAAM,KACJ,mBAAmB;;;;;kCAOrB,MAAM,wBACI,GAAG,EAAE,KAAK,GAAG,4BACX,GAAG,EAAE,KAAK,GAAG;;;;;wBAOvB,mBAAmB;;;;;0CAOf,MAAM,KAAK,IAAI,KACnB,mBAAmB;;;;;2BAOnB,mBAAmB;;;;;qCAOf,MAAM,KAAK,IAAI,KACnB,mBAAmB;;;;;yBAOnB,mBAAmB;;;;;iCAOrB,MAAM,SACN,GAAG,KACD,mBAAmB;;;;;6BAOrB,MAAM,mCAEJ,mBAAmB"}
@@ -4,6 +4,7 @@ export function configure(agentIdentifier: any, opts: {} | undefined, loaderType
4
4
  setPageViewName(name: any, host: any): any;
5
5
  setCustomAttribute(name: any, value: any, persistAttribute?: boolean): any;
6
6
  setUserId(value: string): any;
7
+ setApplicationVersion(value: string | null): any;
7
8
  interaction(): any;
8
9
  noticeError(err: any, customAttributes: any): void;
9
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/loaders/configure/configure.js"],"names":[],"mappings":"AAMA;;;;;;;;EA4BC"}
1
+ {"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/loaders/configure/configure.js"],"names":[],"mappings":"AAMA;;;;;;;;;EAqCC"}
@@ -1,13 +1,13 @@
1
1
  export namespace FEATURE_NAMES {
2
- let ajax: string;
3
- let jserrors: string;
4
- let metrics: string;
5
- let pageAction: string;
6
- let pageViewEvent: string;
7
- let pageViewTiming: string;
8
- let sessionReplay: string;
9
- let sessionTrace: string;
10
- let spa: string;
2
+ const ajax: string;
3
+ const jserrors: string;
4
+ const metrics: string;
5
+ const pageAction: string;
6
+ const pageViewEvent: string;
7
+ const pageViewTiming: string;
8
+ const sessionReplay: string;
9
+ const sessionTrace: string;
10
+ const spa: string;
11
11
  }
12
12
  /**
13
13
  * The order in which features will be instrumented. This is the traditional order. It's unclear if the order of
@@ -18,7 +18,7 @@ export class MicroAgent extends AgentBase {
18
18
  loader_config: any;
19
19
  runtime: any;
20
20
  };
21
- start(): false | this;
21
+ start(): false | MicroAgent;
22
22
  }
23
23
  import { AgentBase } from './agent-base';
24
24
  import { Aggregator } from '../common/aggregate/aggregator';
@@ -1 +1 @@
1
- {"version":3,"file":"micro-agent.d.ts","sourceRoot":"","sources":["../../../src/loaders/micro-agent.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH;IACE;;;OAGG;IACH,qBAHW,MAAM,oBACN,MAAM,cAYhB;IAPC,wBAAsC;IACtC,6BAAiF;IACjF,aAAkB;IAOpB;;;;;MAOC;IAED,sBA8BC;CACF;0BAtEyB,cAAc;2BAPb,gCAAgC"}
1
+ {"version":3,"file":"micro-agent.d.ts","sourceRoot":"","sources":["../../../src/loaders/micro-agent.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH;IACE;;;OAGG;IACH,qBAHW,MAAM,oBACN,MAAM,cAYhB;IAPC,wBAAsC;IACtC,6BAAiF;IACjF,aAAkB;IAOpB;;;;;MAOC;IAED,4BA8BC;CACF;0BAtEyB,cAAc;2BAPb,gCAAgC"}