@newrelic/browser-agent 1.232.1 → 1.233.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.
- package/dist/cjs/cdn/polyfills.js +5 -2
- package/dist/cjs/common/config/state/configurable.js +15 -26
- package/dist/cjs/common/config/state/info.js +1 -1
- package/dist/cjs/common/config/state/init.js +101 -56
- package/dist/cjs/common/config/state/loader-config.js +1 -1
- package/dist/cjs/common/config/state/runtime.js +1 -5
- package/dist/cjs/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/common/drain/drain.js +1 -1
- package/dist/cjs/common/harvest/harvest-scheduler.js +30 -10
- package/dist/cjs/common/harvest/harvest.js +119 -55
- package/dist/cjs/common/session/session-entity.js +35 -22
- package/dist/cjs/common/session/session-entity.test.js +73 -49
- package/dist/cjs/common/timer/interaction-timer.js +9 -12
- package/dist/cjs/common/url/protocol.test.js +0 -1
- package/dist/cjs/common/util/feature-flags.js +2 -1
- package/dist/cjs/common/util/submit-data.js +57 -18
- package/dist/cjs/common/wrap/wrap-fetch.js +1 -1
- package/dist/cjs/common/wrap/wrap-function.js +1 -1
- package/dist/cjs/common/wrap/wrap-promise.js +1 -1
- package/dist/cjs/features/ajax/aggregate/index.js +2 -2
- package/dist/cjs/features/jserrors/aggregate/index.js +7 -5
- package/dist/cjs/features/metrics/aggregate/framework-detection.js +67 -0
- package/dist/cjs/features/metrics/aggregate/framework-detection.test.js +137 -0
- package/dist/cjs/features/metrics/aggregate/index.js +7 -3
- package/dist/cjs/features/metrics/aggregate/polyfill-detection.es5.js +14 -0
- package/dist/cjs/features/metrics/aggregate/polyfill-detection.es5.test.js +17 -0
- package/dist/cjs/features/metrics/aggregate/polyfill-detection.js +53 -0
- package/dist/cjs/features/metrics/aggregate/polyfill-detection.test.js +165 -0
- package/dist/cjs/features/page_action/aggregate/index.js +2 -2
- package/dist/cjs/features/page_view_event/aggregate/index.js +6 -3
- package/dist/cjs/features/page_view_timing/aggregate/index.js +2 -2
- package/dist/cjs/features/session_replay/aggregate/index.js +333 -0
- package/dist/cjs/features/session_replay/constants.js +9 -0
- package/dist/cjs/features/session_replay/index.js +12 -0
- package/dist/cjs/features/session_replay/instrument/index.js +29 -0
- package/dist/cjs/features/session_trace/aggregate/index.js +163 -162
- package/dist/cjs/features/session_trace/constants.js +2 -9
- package/dist/cjs/features/session_trace/instrument/index.js +24 -66
- package/dist/cjs/features/spa/aggregate/index.js +2 -2
- package/dist/cjs/features/utils/agent-session.js +1 -2
- package/dist/cjs/features/utils/aggregate-base.js +64 -0
- package/dist/cjs/features/utils/feature-base.js +0 -31
- package/dist/cjs/features/utils/handler-cache.js +3 -4
- package/dist/cjs/features/utils/instrument-base.js +42 -10
- package/dist/cjs/features/utils/{lazy-loader.js → lazy-feature-loader.js} +4 -2
- package/dist/cjs/loaders/agent.js +1 -1
- package/dist/cjs/loaders/api/apiAsync.js +3 -1
- package/dist/cjs/loaders/configure/configure.js +3 -3
- package/dist/cjs/loaders/features/featureDependencies.js +0 -12
- package/dist/cjs/loaders/features/features.js +3 -1
- package/dist/cjs/loaders/micro-agent.js +6 -6
- package/dist/esm/cdn/polyfills.js +5 -2
- package/dist/esm/common/config/state/configurable.js +14 -24
- package/dist/esm/common/config/state/info.js +2 -2
- package/dist/esm/common/config/state/init.js +102 -57
- package/dist/esm/common/config/state/loader-config.js +2 -2
- package/dist/esm/common/config/state/runtime.js +2 -4
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/common/drain/drain.js +1 -1
- package/dist/esm/common/harvest/harvest-scheduler.js +30 -10
- package/dist/esm/common/harvest/harvest.js +121 -56
- package/dist/esm/common/session/session-entity.js +35 -22
- package/dist/esm/common/session/session-entity.test.js +73 -49
- package/dist/esm/common/timer/interaction-timer.js +9 -12
- package/dist/esm/common/url/protocol.test.js +0 -1
- package/dist/esm/common/util/feature-flags.js +2 -1
- package/dist/esm/common/util/submit-data.js +57 -18
- package/dist/esm/common/wrap/wrap-fetch.js +1 -1
- package/dist/esm/common/wrap/wrap-function.js +1 -1
- package/dist/esm/common/wrap/wrap-promise.js +1 -1
- package/dist/esm/features/ajax/aggregate/index.js +2 -2
- package/dist/esm/features/jserrors/aggregate/index.js +7 -5
- package/dist/esm/features/metrics/aggregate/framework-detection.js +61 -0
- package/dist/esm/features/metrics/aggregate/framework-detection.test.js +133 -0
- package/dist/esm/features/metrics/aggregate/index.js +7 -3
- package/dist/esm/features/metrics/aggregate/polyfill-detection.es5.js +8 -0
- package/dist/esm/features/metrics/aggregate/polyfill-detection.es5.test.js +15 -0
- package/dist/esm/features/metrics/aggregate/polyfill-detection.js +47 -0
- package/dist/esm/features/metrics/aggregate/polyfill-detection.test.js +163 -0
- package/dist/esm/features/page_action/aggregate/index.js +2 -2
- package/dist/esm/features/page_view_event/aggregate/index.js +6 -3
- package/dist/esm/features/page_view_timing/aggregate/index.js +2 -2
- package/dist/esm/features/session_replay/aggregate/index.js +327 -0
- package/dist/esm/features/session_replay/constants.js +2 -0
- package/dist/esm/features/session_replay/index.js +12 -0
- package/dist/esm/features/session_replay/instrument/index.js +21 -0
- package/dist/esm/features/session_trace/aggregate/index.js +163 -162
- package/dist/esm/features/session_trace/constants.js +1 -5
- package/dist/esm/features/session_trace/instrument/index.js +24 -66
- package/dist/esm/features/spa/aggregate/index.js +2 -2
- package/dist/esm/features/utils/agent-session.js +1 -2
- package/dist/esm/features/utils/aggregate-base.js +57 -0
- package/dist/esm/features/utils/feature-base.js +1 -32
- package/dist/esm/features/utils/handler-cache.js +3 -4
- package/dist/esm/features/utils/instrument-base.js +42 -10
- package/dist/esm/features/utils/{lazy-loader.js → lazy-feature-loader.js} +3 -1
- package/dist/esm/loaders/agent.js +1 -1
- package/dist/esm/loaders/api/apiAsync.js +3 -1
- package/dist/esm/loaders/configure/configure.js +3 -3
- package/dist/esm/loaders/features/featureDependencies.js +0 -11
- package/dist/esm/loaders/features/features.js +3 -1
- package/dist/esm/loaders/micro-agent.js +6 -6
- package/dist/types/common/config/state/configurable.d.ts +1 -3
- package/dist/types/common/config/state/configurable.d.ts.map +1 -1
- package/dist/types/common/config/state/init.d.ts.map +1 -1
- package/dist/types/common/config/state/runtime.d.ts.map +1 -1
- package/dist/types/common/harvest/harvest-scheduler.d.ts.map +1 -1
- package/dist/types/common/harvest/harvest.d.ts +37 -34
- package/dist/types/common/harvest/harvest.d.ts.map +1 -1
- package/dist/types/common/session/session-entity.d.ts +6 -3
- package/dist/types/common/session/session-entity.d.ts.map +1 -1
- package/dist/types/common/timer/interaction-timer.d.ts +2 -1
- package/dist/types/common/timer/interaction-timer.d.ts.map +1 -1
- package/dist/types/common/util/feature-flags.d.ts.map +1 -1
- package/dist/types/common/util/submit-data.d.ts +40 -14
- package/dist/types/common/util/submit-data.d.ts.map +1 -1
- package/dist/types/features/ajax/aggregate/index.d.ts +2 -2
- package/dist/types/features/ajax/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/jserrors/aggregate/index.d.ts +2 -2
- package/dist/types/features/jserrors/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/metrics/aggregate/framework-detection.d.ts.map +1 -0
- package/dist/types/features/metrics/aggregate/index.d.ts +2 -2
- package/dist/types/features/metrics/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/metrics/aggregate/polyfill-detection.d.ts +6 -0
- package/dist/types/features/metrics/aggregate/polyfill-detection.d.ts.map +1 -0
- package/dist/types/features/metrics/aggregate/polyfill-detection.es5.d.ts +7 -0
- package/dist/types/features/metrics/aggregate/polyfill-detection.es5.d.ts.map +1 -0
- package/dist/types/features/page_action/aggregate/index.d.ts +2 -2
- package/dist/types/features/page_action/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/page_view_event/aggregate/index.d.ts +2 -2
- package/dist/types/features/page_view_event/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/page_view_timing/aggregate/index.d.ts +2 -2
- package/dist/types/features/page_view_timing/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/session_replay/aggregate/index.d.ts +96 -0
- package/dist/types/features/session_replay/aggregate/index.d.ts.map +1 -0
- package/dist/types/features/session_replay/constants.d.ts +2 -0
- package/dist/types/features/session_replay/constants.d.ts.map +1 -0
- package/dist/types/features/session_replay/index.d.ts +2 -0
- package/dist/types/features/session_replay/index.d.ts.map +1 -0
- package/dist/types/features/session_replay/instrument/index.d.ts +6 -0
- package/dist/types/features/session_replay/instrument/index.d.ts.map +1 -0
- package/dist/types/features/session_trace/aggregate/index.d.ts +8 -57
- package/dist/types/features/session_trace/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/session_trace/constants.d.ts +0 -3
- package/dist/types/features/session_trace/constants.d.ts.map +1 -1
- package/dist/types/features/session_trace/instrument/index.d.ts +1 -3
- package/dist/types/features/session_trace/instrument/index.d.ts.map +1 -1
- package/dist/types/features/spa/aggregate/index.d.ts +2 -2
- package/dist/types/features/spa/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/utils/agent-session.d.ts.map +1 -1
- package/dist/types/features/utils/aggregate-base.d.ts +11 -0
- package/dist/types/features/utils/aggregate-base.d.ts.map +1 -0
- package/dist/types/features/utils/feature-base.d.ts +0 -5
- package/dist/types/features/utils/feature-base.d.ts.map +1 -1
- package/dist/types/features/utils/handler-cache.d.ts.map +1 -1
- package/dist/types/features/utils/instrument-base.d.ts +3 -1
- package/dist/types/features/utils/instrument-base.d.ts.map +1 -1
- package/dist/types/features/utils/{lazy-loader.d.ts → lazy-feature-loader.d.ts} +2 -2
- package/dist/types/features/utils/lazy-feature-loader.d.ts.map +1 -0
- package/dist/types/loaders/configure/configure.d.ts.map +1 -1
- package/dist/types/loaders/features/featureDependencies.d.ts +0 -1
- package/dist/types/loaders/features/featureDependencies.d.ts.map +1 -1
- package/dist/types/loaders/features/features.d.ts +1 -0
- package/dist/types/loaders/features/features.d.ts.map +1 -1
- package/package.json +28 -19
- package/src/cdn/polyfills.js +4 -1
- package/src/common/config/state/configurable.js +18 -24
- package/src/common/config/state/info.js +2 -2
- package/src/common/config/state/init.js +62 -28
- package/src/common/config/state/loader-config.js +2 -2
- package/src/common/config/state/runtime.js +2 -4
- package/src/common/drain/drain.js +1 -1
- package/src/common/harvest/harvest-scheduler.js +35 -10
- package/src/common/harvest/harvest.js +73 -50
- package/src/common/session/session-entity.js +34 -23
- package/src/common/session/session-entity.test.js +57 -51
- package/src/common/timer/interaction-timer.js +9 -12
- package/src/common/url/protocol.test.js +0 -1
- package/src/common/util/feature-flags.js +2 -2
- package/src/common/util/submit-data.js +28 -17
- package/src/common/wrap/wrap-fetch.js +1 -1
- package/src/common/wrap/wrap-function.js +1 -1
- package/src/common/wrap/wrap-promise.js +1 -1
- package/src/features/ajax/aggregate/index.js +2 -2
- package/src/features/jserrors/aggregate/index.js +7 -5
- package/src/features/metrics/aggregate/framework-detection.js +73 -0
- package/src/features/metrics/aggregate/framework-detection.test.js +201 -0
- package/src/features/metrics/aggregate/index.js +8 -3
- package/src/features/metrics/aggregate/polyfill-detection.es5.js +9 -0
- package/src/features/metrics/aggregate/polyfill-detection.es5.test.js +16 -0
- package/src/features/metrics/aggregate/polyfill-detection.js +48 -0
- package/src/features/metrics/aggregate/polyfill-detection.test.js +163 -0
- package/src/features/page_action/aggregate/index.js +2 -2
- package/src/features/page_view_event/aggregate/index.js +5 -5
- package/src/features/page_view_timing/aggregate/index.js +2 -2
- package/src/features/session_replay/aggregate/index.js +314 -0
- package/src/features/session_replay/constants.js +3 -0
- package/src/features/session_replay/index.js +12 -0
- package/src/features/session_replay/instrument/index.js +22 -0
- package/src/features/session_trace/aggregate/index.js +148 -187
- package/src/features/session_trace/constants.js +0 -4
- package/src/features/session_trace/instrument/index.js +17 -69
- package/src/features/spa/aggregate/index.js +2 -2
- package/src/features/utils/agent-session.js +1 -2
- package/src/features/utils/aggregate-base.js +51 -0
- package/src/features/utils/feature-base.js +1 -31
- package/src/features/utils/handler-cache.js +3 -4
- package/src/features/utils/instrument-base.js +40 -8
- package/src/features/utils/{lazy-loader.js → lazy-feature-loader.js} +3 -1
- package/src/loaders/agent.js +1 -1
- package/src/loaders/api/apiAsync.js +1 -1
- package/src/loaders/configure/configure.js +4 -3
- package/src/loaders/features/featureDependencies.js +0 -12
- package/src/loaders/features/features.js +3 -1
- package/src/loaders/micro-agent.js +4 -4
- package/dist/cjs/common/metrics/framework-detection.js +0 -72
- package/dist/cjs/common/util/user-agent.js +0 -57
- package/dist/cjs/common/window/supports-performance-observer.js +0 -15
- package/dist/esm/common/metrics/framework-detection.js +0 -66
- package/dist/esm/common/util/user-agent.js +0 -48
- package/dist/esm/common/window/supports-performance-observer.js +0 -9
- package/dist/types/common/metrics/framework-detection.d.ts.map +0 -1
- package/dist/types/common/util/user-agent.d.ts +0 -5
- package/dist/types/common/util/user-agent.d.ts.map +0 -1
- package/dist/types/common/window/supports-performance-observer.d.ts +0 -2
- package/dist/types/common/window/supports-performance-observer.d.ts.map +0 -1
- package/dist/types/features/utils/lazy-loader.d.ts.map +0 -1
- package/src/common/metrics/framework-detection.js +0 -71
- package/src/common/util/user-agent.js +0 -56
- package/src/common/window/supports-performance-observer.js +0 -10
- /package/dist/types/{common/metrics → features/metrics/aggregate}/framework-detection.d.ts +0 -0
|
@@ -6,7 +6,6 @@ import { isBrowserScope } from '../../common/util/global-scope';
|
|
|
6
6
|
import { SessionEntity } from '../../common/session/session-entity';
|
|
7
7
|
import { LocalStorage } from '../../common/storage/local-storage.js';
|
|
8
8
|
import { FirstPartyCookies } from '../../common/storage/first-party-cookies';
|
|
9
|
-
import { LocalMemory } from '../../common/storage/local-memory';
|
|
10
9
|
let ranOnce = 0;
|
|
11
10
|
export function setupAgentSession(agentIdentifier) {
|
|
12
11
|
const agentRuntime = getRuntime(agentIdentifier);
|
|
@@ -36,7 +35,7 @@ export function setupAgentSession(agentIdentifier) {
|
|
|
36
35
|
// that's currently stored in the storage API into the local info.jsAttributes object
|
|
37
36
|
if (isBrowserScope) {
|
|
38
37
|
// retrieve & re-add all of the persisted setCustomAttribute|setUserId k-v from previous page load(s)
|
|
39
|
-
const customSessionData = agentRuntime.session
|
|
38
|
+
const customSessionData = agentRuntime.session.state.custom;
|
|
40
39
|
const agentInfo = getInfo(agentIdentifier);
|
|
41
40
|
if (customSessionData) {
|
|
42
41
|
setInfo(agentIdentifier, {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { registerHandler } from '../../common/event-emitter/register-handler';
|
|
2
|
+
import { FeatureBase } from './feature-base';
|
|
3
|
+
import { getInfo, isConfigured, getRuntime } from '../../common/config/config';
|
|
4
|
+
import { configure } from '../../loaders/configure/configure';
|
|
5
|
+
import { gosCDN } from '../../common/window/nreum';
|
|
6
|
+
export class AggregateBase extends FeatureBase {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.checkConfiguration();
|
|
10
|
+
}
|
|
11
|
+
waitForFlags() {
|
|
12
|
+
let flagNames = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
13
|
+
return Promise.all(flagNames.map(fName => new Promise(resolve => {
|
|
14
|
+
registerHandler("feat-".concat(fName), () => {
|
|
15
|
+
resolve({
|
|
16
|
+
name: fName,
|
|
17
|
+
value: true
|
|
18
|
+
});
|
|
19
|
+
}, this.featureName, this.ee);
|
|
20
|
+
registerHandler("block-".concat(fName), () => {
|
|
21
|
+
resolve({
|
|
22
|
+
name: fName,
|
|
23
|
+
value: false
|
|
24
|
+
});
|
|
25
|
+
}, this.feature, this.ee);
|
|
26
|
+
})));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Checks for additional `jsAttributes` items to support backward compatibility with implementations of the agent where
|
|
31
|
+
* loader configurations may appear after the loader code is executed.
|
|
32
|
+
*/
|
|
33
|
+
checkConfiguration() {
|
|
34
|
+
// NOTE: This check has to happen at aggregator load time
|
|
35
|
+
if (!isConfigured(this.agentIdentifier)) {
|
|
36
|
+
let jsAttributes = {
|
|
37
|
+
...gosCDN().info?.jsAttributes
|
|
38
|
+
};
|
|
39
|
+
try {
|
|
40
|
+
jsAttributes = {
|
|
41
|
+
...jsAttributes,
|
|
42
|
+
...getInfo(this.agentIdentifier)?.jsAttributes
|
|
43
|
+
};
|
|
44
|
+
} catch (err) {
|
|
45
|
+
// do nothing
|
|
46
|
+
}
|
|
47
|
+
configure(this.agentIdentifier, {
|
|
48
|
+
...gosCDN(),
|
|
49
|
+
info: {
|
|
50
|
+
...gosCDN().info,
|
|
51
|
+
jsAttributes
|
|
52
|
+
},
|
|
53
|
+
runtime: getRuntime(this.agentIdentifier)
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getRuntime } from '../../common/config/config';
|
|
2
2
|
import { ee } from '../../common/event-emitter/contextual-ee';
|
|
3
|
-
import { configure } from '../../loaders/configure/configure';
|
|
4
|
-
import { gosCDN } from '../../common/window/nreum';
|
|
5
3
|
export class FeatureBase {
|
|
6
4
|
constructor(agentIdentifier, aggregator, featureName) {
|
|
7
5
|
/** @type {string} */
|
|
@@ -18,34 +16,5 @@ export class FeatureBase {
|
|
|
18
16
|
* @type {boolean}
|
|
19
17
|
*/
|
|
20
18
|
this.blocked = false;
|
|
21
|
-
this.checkConfiguration();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Checks for additional `jsAttributes` items to support backward compatibility with implementations of the agent where
|
|
26
|
-
* loader configurations may appear after the loader code is executed.
|
|
27
|
-
*/
|
|
28
|
-
checkConfiguration() {
|
|
29
|
-
// NOTE: This check has to happen at aggregator load time
|
|
30
|
-
if (!isConfigured(this.agentIdentifier)) {
|
|
31
|
-
let jsAttributes = {
|
|
32
|
-
...gosCDN().info?.jsAttributes
|
|
33
|
-
};
|
|
34
|
-
try {
|
|
35
|
-
jsAttributes = {
|
|
36
|
-
...jsAttributes,
|
|
37
|
-
...getInfo(this.agentIdentifier)?.jsAttributes
|
|
38
|
-
};
|
|
39
|
-
} catch (err) {
|
|
40
|
-
// do nothing
|
|
41
|
-
}
|
|
42
|
-
configure(this.agentIdentifier, {
|
|
43
|
-
...gosCDN(),
|
|
44
|
-
info: {
|
|
45
|
-
...gosCDN().info,
|
|
46
|
-
jsAttributes
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
19
|
}
|
|
51
20
|
}
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
export class HandlerCache {
|
|
5
5
|
/** @private @type {boolean | undefined} */
|
|
6
6
|
#decision = undefined;
|
|
7
|
-
/** @private @type {boolean} */
|
|
8
|
-
#shouldsettle = true;
|
|
9
7
|
/** @private @type {Function[]} */
|
|
10
8
|
#cache = [];
|
|
11
9
|
/** @private @type {Timeout} */
|
|
@@ -28,7 +26,7 @@ export class HandlerCache {
|
|
|
28
26
|
* @private
|
|
29
27
|
*/
|
|
30
28
|
#close() {
|
|
31
|
-
this.#
|
|
29
|
+
this.#decision = false; // settle() & decide() cannot be used after close
|
|
32
30
|
this.#cache = [];
|
|
33
31
|
}
|
|
34
32
|
|
|
@@ -38,7 +36,7 @@ export class HandlerCache {
|
|
|
38
36
|
* @returns {void}
|
|
39
37
|
*/
|
|
40
38
|
settle(handler) {
|
|
41
|
-
if (this.#decision === false
|
|
39
|
+
if (this.#decision === false) return;else if (this.#decision === undefined) this.#cache.push(handler);else handler();
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
/**
|
|
@@ -50,6 +48,7 @@ export class HandlerCache {
|
|
|
50
48
|
* @param {boolean} decision
|
|
51
49
|
*/
|
|
52
50
|
decide(decision) {
|
|
51
|
+
if (this.#decision !== undefined) return; // a decision can only be made once
|
|
53
52
|
this.#decision = decision;
|
|
54
53
|
if (decision === false) this.#close();
|
|
55
54
|
if (decision === true) this.#drain();
|
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
* exposes the `blocked` property.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { registerDrain } from '../../common/drain/drain';
|
|
7
|
+
import { drain, registerDrain } from '../../common/drain/drain';
|
|
8
8
|
import { FeatureBase } from './feature-base';
|
|
9
9
|
import { onWindowLoad } from '../../common/window/load';
|
|
10
10
|
import { isWorkerScope } from '../../common/util/global-scope';
|
|
11
11
|
import { warn } from '../../common/util/console';
|
|
12
|
+
import { FEATURE_NAMES } from '../../loaders/features/features';
|
|
13
|
+
import { getConfigurationValue } from '../../common/config/config';
|
|
12
14
|
|
|
13
15
|
/**
|
|
14
16
|
* Base class for instrumenting a feature.
|
|
@@ -38,10 +40,18 @@ export class InstrumentBase extends FeatureBase {
|
|
|
38
40
|
/**
|
|
39
41
|
* Lazy-load the latter part of the feature: its aggregator. This method is called by the first part of the feature
|
|
40
42
|
* (the instrumentation) when instrumentation is complete.
|
|
43
|
+
* @param {Object} [argsObjFromInstrument] - any values or references to pass down to aggregate
|
|
44
|
+
* @returns void
|
|
41
45
|
*/
|
|
42
|
-
importAggregator() {
|
|
46
|
+
importAggregator(argsObjFromInstrument) {
|
|
43
47
|
if (this.hasAggregator || !this.auto) return;
|
|
44
48
|
this.hasAggregator = true;
|
|
49
|
+
let session, agentSessionImport;
|
|
50
|
+
if (getConfigurationValue(this.agentIdentifier, 'privacy.cookies_enabled') === true && !isWorkerScope) {
|
|
51
|
+
agentSessionImport = import( /* webpackChunkName: "session-manager" */'./agent-session').catch(err => {
|
|
52
|
+
warn('failed to import the session manager', err);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
45
55
|
const importLater = async () => {
|
|
46
56
|
/**
|
|
47
57
|
* Note this try-catch differs from the one in Agent.start() in that it's placed later in a page's lifecycle and
|
|
@@ -49,18 +59,25 @@ export class InstrumentBase extends FeatureBase {
|
|
|
49
59
|
*/
|
|
50
60
|
try {
|
|
51
61
|
// The session entity needs to be attached to the config internals before the aggregator chunk runs
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
62
|
+
if (agentSessionImport && !session) {
|
|
63
|
+
const {
|
|
64
|
+
setupAgentSession
|
|
65
|
+
} = await agentSessionImport;
|
|
66
|
+
session = setupAgentSession(this.agentIdentifier);
|
|
67
|
+
}
|
|
68
|
+
if (!shouldImportAgg(this.featureName, session)) {
|
|
69
|
+
drain(this.agentIdentifier, this.featureName);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
56
73
|
// import and instantiate the aggregator chunk
|
|
57
74
|
const {
|
|
58
|
-
|
|
59
|
-
} = await import( /* webpackChunkName: "lazy-loader" */'./lazy-loader');
|
|
75
|
+
lazyFeatureLoader
|
|
76
|
+
} = await import( /* webpackChunkName: "lazy-feature-loader" */'./lazy-feature-loader');
|
|
60
77
|
const {
|
|
61
78
|
Aggregate
|
|
62
|
-
} = await
|
|
63
|
-
new Aggregate(this.agentIdentifier, this.aggregator);
|
|
79
|
+
} = await lazyFeatureLoader(this.featureName, 'aggregate');
|
|
80
|
+
new Aggregate(this.agentIdentifier, this.aggregator, argsObjFromInstrument);
|
|
64
81
|
} catch (e) {
|
|
65
82
|
warn("Downloading ".concat(this.featureName, " failed..."), e);
|
|
66
83
|
this.abortHandler?.(); // undo any important alterations made to the page
|
|
@@ -72,4 +89,19 @@ export class InstrumentBase extends FeatureBase {
|
|
|
72
89
|
// Non-browser scopes (i.e. workers) have no `window.load` event, so the aggregator can be lazy-loaded immediately.
|
|
73
90
|
if (isWorkerScope) importLater();else onWindowLoad(() => importLater(), true);
|
|
74
91
|
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Make a determination if an aggregate class should even be imported
|
|
95
|
+
* @param {string} featureName
|
|
96
|
+
* @param {SessionEntity} session
|
|
97
|
+
* @returns
|
|
98
|
+
*/
|
|
99
|
+
function shouldImportAgg(featureName, session) {
|
|
100
|
+
// if this isnt the FIRST load of a session AND
|
|
101
|
+
// we are not actively recording SR... DO NOT run the aggregator
|
|
102
|
+
// session replay samples can only be decided on the first load of a session
|
|
103
|
+
// session replays can continue if in progress
|
|
104
|
+
if (featureName === FEATURE_NAMES.sessionReplay) return !!session?.isNew || !!session?.state.sessionReplayActive;
|
|
105
|
+
// todo -- add case like above for session trace
|
|
106
|
+
return true;
|
|
75
107
|
}
|
|
@@ -11,7 +11,7 @@ import { FEATURE_NAMES } from '../../loaders/features/features';
|
|
|
11
11
|
* @param featurePart Name of the feature part to load; should be either instrument or aggregate
|
|
12
12
|
* @returns {Promise<InstrumentBase|FeatureBase|null>}
|
|
13
13
|
*/
|
|
14
|
-
export function
|
|
14
|
+
export function lazyFeatureLoader(featureName, featurePart) {
|
|
15
15
|
if (featurePart === 'aggregate') {
|
|
16
16
|
switch (featureName) {
|
|
17
17
|
case FEATURE_NAMES.ajax:
|
|
@@ -26,6 +26,8 @@ export function lazyLoader(featureName, featurePart) {
|
|
|
26
26
|
return import( /* webpackChunkName: "page_view_event-aggregate" */'../page_view_event/aggregate');
|
|
27
27
|
case FEATURE_NAMES.pageViewTiming:
|
|
28
28
|
return import( /* webpackChunkName: "page_view_timing-aggregate" */'../page_view_timing/aggregate');
|
|
29
|
+
case FEATURE_NAMES.sessionReplay:
|
|
30
|
+
return import( /* webpackChunkName: "session_replay-aggregate" */'../session_replay/aggregate');
|
|
29
31
|
case FEATURE_NAMES.sessionTrace:
|
|
30
32
|
return import( /* webpackChunkName: "session_trace-aggregate" */'../session_trace/aggregate');
|
|
31
33
|
case FEATURE_NAMES.spa:
|
|
@@ -47,7 +47,7 @@ export class Agent {
|
|
|
47
47
|
// Attempt to initialize all the requested features (sequentially in prio order & synchronously), with any failure aborting the whole process.
|
|
48
48
|
try {
|
|
49
49
|
const enabledFeatures = getEnabledFeatures(this.agentIdentifier);
|
|
50
|
-
const featuresToStart =
|
|
50
|
+
const featuresToStart = [...this.desiredFeatures];
|
|
51
51
|
featuresToStart.sort((a, b) => featurePriority[a.featureName] - featurePriority[b.featureName]);
|
|
52
52
|
featuresToStart.forEach(f => {
|
|
53
53
|
// pageViewEvent must be enabled because RUM calls are not optional. See comment in constructor and PR 428.
|
|
@@ -76,7 +76,9 @@ export function setAPI(agentIdentifier) {
|
|
|
76
76
|
url += 'dc=' + ~~dom_time + '&';
|
|
77
77
|
url += 'fe=' + ~~fe_time + '&';
|
|
78
78
|
url += 'c=' + cycle;
|
|
79
|
-
submitData.img(
|
|
79
|
+
submitData.img({
|
|
80
|
+
url
|
|
81
|
+
});
|
|
80
82
|
}
|
|
81
83
|
function setErrorHandler(t, handler) {
|
|
82
84
|
getRuntime(agentIdentifier).onerror = handler;
|
|
@@ -22,15 +22,15 @@ export function configure(agentIdentifier) {
|
|
|
22
22
|
info = nr.info;
|
|
23
23
|
loader_config = nr.loader_config;
|
|
24
24
|
}
|
|
25
|
+
setConfiguration(agentIdentifier, init || {});
|
|
26
|
+
setLoaderConfig(agentIdentifier, loader_config || {});
|
|
27
|
+
setRuntime(agentIdentifier, runtime);
|
|
25
28
|
info.jsAttributes ??= {};
|
|
26
29
|
if (isWorkerScope) {
|
|
27
30
|
// add a default attr to all worker payloads
|
|
28
31
|
info.jsAttributes.isWorker = true;
|
|
29
32
|
}
|
|
30
33
|
setInfo(agentIdentifier, info);
|
|
31
|
-
setConfiguration(agentIdentifier, init || {});
|
|
32
|
-
setLoaderConfig(agentIdentifier, loader_config || {});
|
|
33
|
-
setRuntime(agentIdentifier, runtime);
|
|
34
34
|
setTopLevelCallers();
|
|
35
35
|
const api = setAPI(agentIdentifier, forceDrain);
|
|
36
36
|
gosNREUMInitializedAgents(agentIdentifier, api, 'api');
|
|
@@ -11,15 +11,4 @@ export function getFeatureDependencyNames(feature) {
|
|
|
11
11
|
default:
|
|
12
12
|
return [];
|
|
13
13
|
}
|
|
14
|
-
}
|
|
15
|
-
export function getFrozenAttributes(feature) {
|
|
16
|
-
switch (feature) {
|
|
17
|
-
// right now, jserrors is the only feature that can have "on" or "off" page-level auto-instrumentation...
|
|
18
|
-
// page_action is always "off" (no instr)
|
|
19
|
-
// as new API/manual implementation methods are added, this list can likely be pruned
|
|
20
|
-
case FEATURE_NAMES.jserrors:
|
|
21
|
-
return [];
|
|
22
|
-
default:
|
|
23
|
-
return ['auto'];
|
|
24
|
-
}
|
|
25
14
|
}
|
|
@@ -5,6 +5,7 @@ export const FEATURE_NAMES = {
|
|
|
5
5
|
pageAction: 'page_action',
|
|
6
6
|
pageViewEvent: 'page_view_event',
|
|
7
7
|
pageViewTiming: 'page_view_timing',
|
|
8
|
+
sessionReplay: 'session_replay',
|
|
8
9
|
sessionTrace: 'session_trace',
|
|
9
10
|
spa: 'spa'
|
|
10
11
|
};
|
|
@@ -21,5 +22,6 @@ export const featurePriority = {
|
|
|
21
22
|
[FEATURE_NAMES.ajax]: 5,
|
|
22
23
|
[FEATURE_NAMES.sessionTrace]: 6,
|
|
23
24
|
[FEATURE_NAMES.pageAction]: 7,
|
|
24
|
-
[FEATURE_NAMES.spa]: 8
|
|
25
|
+
[FEATURE_NAMES.spa]: 8,
|
|
26
|
+
[FEATURE_NAMES.sessionReplay]: 9
|
|
25
27
|
};
|
|
@@ -51,11 +51,11 @@ export class MicroAgent {
|
|
|
51
51
|
autoFeatures.forEach(f => {
|
|
52
52
|
if (enabledFeatures[f]) {
|
|
53
53
|
// TODO - THIS does not work, the instrument switch in lazy loader increases the size of the worker build. Needs to be revisited
|
|
54
|
-
import( /* webpackChunkName: "lazy-loader" */'../features/utils/lazy-loader').then(_ref => {
|
|
54
|
+
import( /* webpackChunkName: "lazy-feature-loader" */'../features/utils/lazy-feature-loader').then(_ref => {
|
|
55
55
|
let {
|
|
56
|
-
|
|
56
|
+
lazyFeatureLoader
|
|
57
57
|
} = _ref;
|
|
58
|
-
return
|
|
58
|
+
return lazyFeatureLoader(f, 'instrument');
|
|
59
59
|
}).then(_ref2 => {
|
|
60
60
|
let {
|
|
61
61
|
Instrument
|
|
@@ -68,11 +68,11 @@ export class MicroAgent {
|
|
|
68
68
|
if (enabledFeatures[f]) {
|
|
69
69
|
// TODO - THIS does not work, the instrument switch in lazy loader increases the size of the worker build. Needs to be revisited
|
|
70
70
|
// Parts of the lazy-loader were removed because webpack was transpiling them into the worker build, errantly inflating the build size.
|
|
71
|
-
import( /* webpackChunkName: "lazy-loader" */'../features/utils/lazy-loader').then(_ref3 => {
|
|
71
|
+
import( /* webpackChunkName: "lazy-feature-loader" */'../features/utils/lazy-feature-loader').then(_ref3 => {
|
|
72
72
|
let {
|
|
73
|
-
|
|
73
|
+
lazyFeatureLoader
|
|
74
74
|
} = _ref3;
|
|
75
|
-
return
|
|
75
|
+
return lazyFeatureLoader(f, 'aggregate');
|
|
76
76
|
}).then(_ref4 => {
|
|
77
77
|
let {
|
|
78
78
|
Aggregate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurable.d.ts","sourceRoot":"","sources":["../../../../../src/common/config/state/configurable.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"configurable.d.ts","sourceRoot":"","sources":["../../../../../src/common/config/state/configurable.js"],"names":[],"mappings":"AAEA,4DAwBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../src/common/config/state/init.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../src/common/config/state/init.js"],"names":[],"mappings":"AAqEA,+CAIC;AAED,0DAIC;AAED,+DAYC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../../src/common/config/state/runtime.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../../src/common/config/state/runtime.js"],"names":[],"mappings":"AA6BA,yCAIC;AAED,oDAIC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harvest-scheduler.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/harvest-scheduler.js"],"names":[],"mappings":"AAWA;;GAEG;AACH;IACE,mDAeC;IAbC,cAAwB;IACxB,UAAsB;IACtB,iBAAoB;IACpB,qCAAyB;IACzB,iBAAoB;IAEpB,iBAA8C;IAShD,eAKC;IAED,mDAIC;IAHC,cAAwB;IAK1B,uCAMC;IAED,6CAWC;IAED,
|
|
1
|
+
{"version":3,"file":"harvest-scheduler.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/harvest-scheduler.js"],"names":[],"mappings":"AAWA;;GAEG;AACH;IACE,mDAeC;IAbC,cAAwB;IACxB,UAAsB;IACtB,iBAAoB;IACpB,qCAAyB;IACzB,iBAAoB;IAEpB,iBAA8C;IAShD,eAKC;IAED,mDAIC;IAHC,cAAwB;IAK1B,uCAMC;IAED,6CAWC;IAED,yCAsDC;IAED,gDAiBC;CACF;8BAtI6B,2BAA2B;wBAChB,WAAW"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
export function getSubmitMethod(endpoint: any, opts: any): {
|
|
2
|
-
method: ((url
|
|
2
|
+
method: (({ url, body, sync, method, headers }: {
|
|
3
|
+
url: string;
|
|
4
|
+
body?: string | undefined;
|
|
5
|
+
sync?: boolean | undefined;
|
|
6
|
+
method?: string | undefined;
|
|
7
|
+
headers?: {
|
|
8
|
+
key: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}[] | undefined;
|
|
11
|
+
}) => XMLHttpRequest) | (({ url }: {
|
|
12
|
+
url: string;
|
|
13
|
+
}) => HTMLImageElement) | (({ url, body }: {
|
|
14
|
+
url: string;
|
|
15
|
+
body?: string | undefined;
|
|
16
|
+
}) => boolean);
|
|
3
17
|
useBody: boolean;
|
|
4
18
|
};
|
|
5
19
|
export class Harvest extends SharedContext {
|
|
@@ -10,41 +24,29 @@ export class Harvest extends SharedContext {
|
|
|
10
24
|
/**
|
|
11
25
|
* Initiate a harvest from multiple sources. An event that corresponds to the endpoint
|
|
12
26
|
* name is emitted, which gives any listeners the opportunity to provide payload data.
|
|
13
|
-
*
|
|
14
|
-
* @param {string} endpoint - The endpoint of the harvest (jserrors, events, resources etc.)
|
|
15
|
-
*
|
|
16
|
-
* @param {object} opts
|
|
17
|
-
* @param {bool} opts.needResponse - Specify whether the caller expects a response data.
|
|
18
|
-
* @param {bool} opts.unload - Specify whether the call is a final harvest during page unload.
|
|
27
|
+
* @param {NetworkSendSpec} spec Specification for sending data
|
|
19
28
|
*/
|
|
20
|
-
sendX(
|
|
21
|
-
needResponse: bool;
|
|
22
|
-
unload: bool;
|
|
23
|
-
}, cbFinished: any): any;
|
|
29
|
+
sendX(spec: NetworkSendSpec): any;
|
|
24
30
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
unload: bool;
|
|
45
|
-
}, submitMethod: any, cbFinished: any): any;
|
|
46
|
-
obfuscateAndSend(endpoint: any, payload: any, opts: any, submitMethod: any, cbFinished: any): any;
|
|
47
|
-
_send(endpoint: any, payload: any, opts: any, submitMethod: any, cbFinished: any): any;
|
|
31
|
+
* Initiate a harvest call.
|
|
32
|
+
* @param {NetworkSendSpec} spec Specification for sending data
|
|
33
|
+
*/
|
|
34
|
+
send(spec: NetworkSendSpec): any;
|
|
35
|
+
/**
|
|
36
|
+
* Apply obfuscation rules to the payload and then initial the harvest network call.
|
|
37
|
+
* @param {NetworkSendSpec} spec Specification for sending data
|
|
38
|
+
*/
|
|
39
|
+
obfuscateAndSend(spec: NetworkSendSpec): any;
|
|
40
|
+
_send({ endpoint, payload, opts, submitMethod, cbFinished, customUrl, gzip, includeBaseParams }: {
|
|
41
|
+
endpoint: any;
|
|
42
|
+
payload?: {} | undefined;
|
|
43
|
+
opts?: {} | undefined;
|
|
44
|
+
submitMethod: any;
|
|
45
|
+
cbFinished: any;
|
|
46
|
+
customUrl: any;
|
|
47
|
+
gzip: any;
|
|
48
|
+
includeBaseParams?: boolean | undefined;
|
|
49
|
+
}): any;
|
|
48
50
|
baseQueryString(): string;
|
|
49
51
|
createPayload(type: any, options: any): {
|
|
50
52
|
body: {} | undefined;
|
|
@@ -53,6 +55,7 @@ export class Harvest extends SharedContext {
|
|
|
53
55
|
on(type: any, listener: any): void;
|
|
54
56
|
resetListeners(): void;
|
|
55
57
|
}
|
|
58
|
+
export type NetworkSendSpec = object;
|
|
56
59
|
import { SharedContext } from '../context/shared-context';
|
|
57
60
|
import { Obfuscator } from '../util/obfuscate';
|
|
58
61
|
//# sourceMappingURL=harvest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harvest.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/harvest.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"harvest.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/harvest.js"],"names":[],"mappings":"AAoOA;;;;;;;;;;;;;;;;;EAsBC;AAnND;IAII,0BAA2H;IAC3H,uBAAoD;IACpD,kCAAsH;IAEtH,YAAiB;IAGnB;;;;OAIG;IACH,YAFW,eAAe,OAYzB;IAED;;;OAGG;IACH,WAFW,eAAe,OAazB;IAED;;;OAGG;IACH,uBAFW,eAAe,OAMzB;IAED;;;;;;;;;YAkFC;IAGD,0BAmBC;IAED;;;MAYC;IAED,mCAGC;IAED,uBAIC;CACF;8BA3MY,MAAM;8BALW,2BAA2B;2BAF9B,mBAAmB"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export namespace SESSION_EVENTS {
|
|
2
|
+
const PAUSE: string;
|
|
3
|
+
const RESET: string;
|
|
4
|
+
const RESUME: string;
|
|
5
|
+
}
|
|
1
6
|
export class SessionEntity {
|
|
2
7
|
/**
|
|
3
8
|
* Create a self-managing Session Entity. This entity is scoped to the agent identifier which triggered it, allowing for multiple simultaneous session objects to exist.
|
|
@@ -15,15 +20,13 @@ export class SessionEntity {
|
|
|
15
20
|
storageAPI?: LocalMemory | undefined;
|
|
16
21
|
}): void;
|
|
17
22
|
storage: LocalMemory | undefined;
|
|
23
|
+
state: {} | undefined;
|
|
18
24
|
agentIdentifier: any;
|
|
19
25
|
key: any;
|
|
20
|
-
value: string | undefined;
|
|
21
26
|
expiresMs: number | undefined;
|
|
22
27
|
inactiveMs: number | undefined;
|
|
23
28
|
ee: any;
|
|
24
|
-
expiresAt: any;
|
|
25
29
|
expiresTimer: Timer | undefined;
|
|
26
|
-
inactiveAt: any;
|
|
27
30
|
inactiveTimer: InteractionTimer | undefined;
|
|
28
31
|
isNew: boolean | undefined;
|
|
29
32
|
initialized: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-entity.d.ts","sourceRoot":"","sources":["../../../../src/common/session/session-entity.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session-entity.d.ts","sourceRoot":"","sources":["../../../../src/common/session/session-entity.js"],"names":[],"mappings":";;;;;AAiCA;IACE;;;;;OAKG;IACH,uBAEC;IAED;;;;;;;aAkFC;IAhFsB,iCAAgC;IAGrD,sBAAe;IAIf,qBAAsC;IAEtC,SAAc;IAId,8BAA0B;IAC1B,+BAA4B;IAE5B,QAAiC;IAgB/B,gCAOqC;IAUrC,4CAiBsC;IAOV,2BAA6C;IAM3E,iCAAuB;IAIzB,wBAEC;IAED,sBAEC;IAED;;;OAGG;IACH,QAFa,MAAM,CA6BlB;IAED;;;;;;OAMG;IACH,YAHW,MAAM,GACJ,MAAM,CAiBlB;IAED,gBAuBC;IAED;;OAEG;IACH,gBAIC;IAED;;;OAGG;IACH,qBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;OAGG;IACH,gBAHW,MAAM,GACJ,OAAO,CAKnB;IAED,yDAYC;IAED;;;OAGG;IACH,6BAHW,MAAM,GACJ,MAAM,CAIlB;IAED,gDAaC;IAHG,YAAuD;CAI5D;4BAlR2B,yBAAyB;sBAH/B,gBAAgB;iCAIL,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interaction-timer.d.ts","sourceRoot":"","sources":["../../../../src/common/timer/interaction-timer.js"],"names":[],"mappings":"AAKA;IAGI,
|
|
1
|
+
{"version":3,"file":"interaction-timer.d.ts","sourceRoot":"","sources":["../../../../src/common/timer/interaction-timer.js"],"names":[],"mappings":"AAKA;IAGI,aAAuF;IACvF,eAA6F;IAC7F,cAA0F;IAG1F,gCAA4B;IAM1B,6CAA4C;IAkChD,cAGC;IAED,cAIC;IAED,gCAMC;CACF;sBAvEqB,SAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-flags.d.ts","sourceRoot":"","sources":["../../../../src/common/util/feature-flags.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature-flags.d.ts","sourceRoot":"","sources":["../../../../src/common/util/feature-flags.js"],"names":[],"mappings":"AAkBA,yEAiBC;AAED,mCAAmC"}
|
|
@@ -1,35 +1,61 @@
|
|
|
1
1
|
export namespace submitData {
|
|
2
2
|
/**
|
|
3
3
|
* Send via JSONP. Do NOT call this function outside of a guaranteed web window environment.
|
|
4
|
-
* @param {
|
|
5
|
-
* @param {string}
|
|
4
|
+
* @param {Object} args - The args
|
|
5
|
+
* @param {string} args.url - The URL to send to
|
|
6
|
+
* @param {string} args.jsonp - The string name of the jsonp cb method
|
|
7
|
+
* @returns {XMLHttpRequest}
|
|
6
8
|
* @returns {Element}
|
|
7
9
|
*/
|
|
8
|
-
function jsonp(url
|
|
9
|
-
|
|
10
|
+
function jsonp({ url, jsonp }: {
|
|
11
|
+
url: string;
|
|
12
|
+
jsonp: string;
|
|
13
|
+
}): XMLHttpRequest;
|
|
14
|
+
function xhrGet({ url }: {
|
|
15
|
+
url: any;
|
|
16
|
+
}): XMLHttpRequest;
|
|
10
17
|
/**
|
|
11
18
|
* Send via XHR
|
|
12
|
-
* @param {
|
|
13
|
-
* @param {string}
|
|
14
|
-
* @param {
|
|
19
|
+
* @param {Object} args - The args
|
|
20
|
+
* @param {string} args.url - The URL to send to
|
|
21
|
+
* @param {string=} args.body - The Stringified body
|
|
22
|
+
* @param {boolean=} args.sync - Run XHR as Synchronous
|
|
23
|
+
* @param {string=} [args.method=POST] - The XHR method to use
|
|
24
|
+
* @param {{key: string, value: string}[]} [args.headers] - The headers to attach
|
|
15
25
|
* @returns {XMLHttpRequest}
|
|
16
26
|
*/
|
|
17
|
-
function xhr(url
|
|
27
|
+
function xhr({ url, body, sync, method, headers }: {
|
|
28
|
+
url: string;
|
|
29
|
+
body?: string | undefined;
|
|
30
|
+
sync?: boolean | undefined;
|
|
31
|
+
method?: string | undefined;
|
|
32
|
+
headers?: {
|
|
33
|
+
key: string;
|
|
34
|
+
value: string;
|
|
35
|
+
}[] | undefined;
|
|
36
|
+
}): XMLHttpRequest;
|
|
18
37
|
/**
|
|
19
38
|
* Unused at the moment -- DEPRECATED
|
|
20
39
|
*/
|
|
21
40
|
/**
|
|
22
41
|
* Send by appending an <img> element to the page. Do NOT call this function outside of a guaranteed web window environment.
|
|
23
|
-
* @param {
|
|
24
|
-
* @
|
|
42
|
+
* @param {Object} args - The args
|
|
43
|
+
* @param {string} args.url - The URL to send to
|
|
44
|
+
* @returns {HTMLImageElement}
|
|
25
45
|
*/
|
|
26
|
-
function img(url
|
|
46
|
+
function img({ url }: {
|
|
47
|
+
url: string;
|
|
48
|
+
}): HTMLImageElement;
|
|
27
49
|
/**
|
|
28
50
|
* Send via sendBeacon. Do NOT call this function outside of a guaranteed web window environment.
|
|
29
|
-
* @param {
|
|
30
|
-
* @param {string}
|
|
51
|
+
* @param {Object} args - The args
|
|
52
|
+
* @param {string} args.url - The URL to send to
|
|
53
|
+
* @param {string=} args.body - The Stringified body
|
|
31
54
|
* @returns {boolean}
|
|
32
55
|
*/
|
|
33
|
-
function beacon(url
|
|
56
|
+
function beacon({ url, body }: {
|
|
57
|
+
url: string;
|
|
58
|
+
body?: string | undefined;
|
|
59
|
+
}): boolean;
|
|
34
60
|
}
|
|
35
61
|
//# sourceMappingURL=submit-data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit-data.d.ts","sourceRoot":"","sources":["../../../../src/common/util/submit-data.js"],"names":[],"mappings":";IAOA
|
|
1
|
+
{"version":3,"file":"submit-data.d.ts","sourceRoot":"","sources":["../../../../src/common/util/submit-data.js"],"names":[],"mappings":";IAOA;;;;;;;OAOG;IACH;;;uBAsBC;IAED;;uBAEC;IAED;;;;;;;;;OASG;IACH;;;;;;;;;uBAiBC;IAED;;OAEG;IAKH;;;;;OAKG;IACH;;yBAKC;IAED;;;;;;OAMG;IACH;;;gBAYC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class Aggregate extends
|
|
1
|
+
export class Aggregate extends AggregateBase {
|
|
2
2
|
static featureName: string;
|
|
3
3
|
constructor(agentIdentifier: any, aggregator: any);
|
|
4
4
|
storeXhr: (params: any, metrics: any, startTime: any, endTime: any, type: any) => void;
|
|
@@ -12,5 +12,5 @@ export class Aggregate extends FeatureBase {
|
|
|
12
12
|
spaAjaxEvents: {};
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
import {
|
|
15
|
+
import { AggregateBase } from '../../utils/aggregate-base';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|