@newrelic/browser-agent 1.254.1 → 1.256.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/CHANGELOG.md +25 -0
- package/dist/cjs/common/config/state/runtime.js +2 -1
- package/dist/cjs/common/constants/env.cdn.js +2 -2
- package/dist/cjs/common/constants/env.npm.js +2 -2
- package/dist/cjs/common/constants/runtime.js +1 -1
- package/dist/cjs/common/context/shared-context.js +1 -1
- package/dist/cjs/common/harvest/harvest.js +2 -1
- package/dist/cjs/common/session/session-entity.js +2 -1
- package/dist/cjs/common/timer/interaction-timer.js +16 -2
- package/dist/cjs/common/timing/time-keeper.js +23 -19
- package/dist/cjs/common/vitals/cumulative-layout-shift.js +12 -5
- package/dist/cjs/common/vitals/first-contentful-paint.js +10 -6
- package/dist/cjs/common/vitals/first-input-delay.js +12 -10
- package/dist/cjs/common/vitals/first-paint.js +1 -2
- package/dist/cjs/common/vitals/interaction-to-next-paint.js +11 -7
- package/dist/cjs/common/vitals/largest-contentful-paint.js +19 -17
- package/dist/cjs/common/vitals/long-task.js +0 -1
- package/dist/cjs/common/vitals/time-to-first-byte.js +11 -6
- package/dist/cjs/common/vitals/vital-metric.js +1 -4
- package/dist/cjs/common/window/nreum.js +1 -1
- package/dist/cjs/features/ajax/aggregate/index.js +3 -2
- package/dist/cjs/features/ajax/instrument/index.js +1 -1
- package/dist/cjs/features/jserrors/aggregate/index.js +19 -8
- package/dist/cjs/features/jserrors/instrument/index.js +9 -4
- package/dist/cjs/features/page_action/aggregate/index.js +3 -2
- package/dist/cjs/features/page_view_event/aggregate/index.js +10 -5
- package/dist/cjs/features/page_view_timing/aggregate/index.js +21 -7
- package/dist/cjs/features/page_view_timing/instrument/index.js +1 -1
- package/dist/cjs/features/session_replay/aggregate/index.js +59 -35
- package/dist/cjs/features/session_replay/constants.js +2 -1
- package/dist/cjs/features/session_replay/instrument/index.js +9 -2
- package/dist/cjs/features/session_replay/shared/recorder.js +20 -4
- package/dist/cjs/features/session_replay/shared/utils.js +12 -0
- package/dist/cjs/features/session_trace/aggregate/index.js +20 -23
- package/dist/cjs/features/session_trace/instrument/index.js +1 -1
- package/dist/cjs/features/soft_navigations/aggregate/index.js +2 -2
- package/dist/cjs/features/soft_navigations/instrument/index.js +1 -1
- package/dist/cjs/features/spa/aggregate/index.js +19 -10
- package/dist/cjs/features/spa/instrument/index.js +1 -1
- package/dist/cjs/features/utils/feature-base.js +0 -2
- package/dist/cjs/loaders/agent-base.js +0 -2
- package/dist/cjs/loaders/agent.js +1 -1
- package/dist/cjs/loaders/api/api.js +8 -2
- package/dist/cjs/loaders/configure/configure.js +1 -0
- package/dist/cjs/loaders/micro-agent.js +4 -7
- package/dist/esm/common/config/state/runtime.js +2 -1
- package/dist/esm/common/constants/env.cdn.js +2 -2
- package/dist/esm/common/constants/env.npm.js +2 -2
- package/dist/esm/common/constants/runtime.js +1 -1
- package/dist/esm/common/context/shared-context.js +1 -1
- package/dist/esm/common/harvest/harvest.js +2 -1
- package/dist/esm/common/session/session-entity.js +2 -1
- package/dist/esm/common/timer/interaction-timer.js +16 -2
- package/dist/esm/common/timing/time-keeper.js +23 -20
- package/dist/esm/common/vitals/cumulative-layout-shift.js +11 -4
- package/dist/esm/common/vitals/first-contentful-paint.js +9 -5
- package/dist/esm/common/vitals/first-input-delay.js +11 -9
- package/dist/esm/common/vitals/first-paint.js +1 -2
- package/dist/esm/common/vitals/interaction-to-next-paint.js +10 -6
- package/dist/esm/common/vitals/largest-contentful-paint.js +18 -16
- package/dist/esm/common/vitals/long-task.js +0 -1
- package/dist/esm/common/vitals/time-to-first-byte.js +10 -5
- package/dist/esm/common/vitals/vital-metric.js +1 -4
- package/dist/esm/common/window/nreum.js +1 -1
- package/dist/esm/features/ajax/aggregate/index.js +3 -2
- package/dist/esm/features/ajax/instrument/index.js +1 -1
- package/dist/esm/features/jserrors/aggregate/index.js +19 -8
- package/dist/esm/features/jserrors/instrument/index.js +9 -4
- package/dist/esm/features/page_action/aggregate/index.js +3 -2
- package/dist/esm/features/page_view_event/aggregate/index.js +10 -5
- package/dist/esm/features/page_view_timing/aggregate/index.js +21 -7
- package/dist/esm/features/page_view_timing/instrument/index.js +1 -1
- package/dist/esm/features/session_replay/aggregate/index.js +59 -35
- package/dist/esm/features/session_replay/constants.js +2 -1
- package/dist/esm/features/session_replay/instrument/index.js +9 -2
- package/dist/esm/features/session_replay/shared/recorder.js +21 -5
- package/dist/esm/features/session_replay/shared/utils.js +11 -0
- package/dist/esm/features/session_trace/aggregate/index.js +20 -23
- package/dist/esm/features/session_trace/instrument/index.js +1 -1
- package/dist/esm/features/soft_navigations/aggregate/index.js +2 -2
- package/dist/esm/features/soft_navigations/instrument/index.js +1 -1
- package/dist/esm/features/spa/aggregate/index.js +19 -10
- package/dist/esm/features/spa/instrument/index.js +1 -1
- package/dist/esm/features/utils/feature-base.js +0 -2
- package/dist/esm/loaders/agent-base.js +0 -2
- package/dist/esm/loaders/agent.js +1 -1
- package/dist/esm/loaders/api/api.js +8 -2
- package/dist/esm/loaders/configure/configure.js +1 -0
- package/dist/esm/loaders/micro-agent.js +4 -7
- package/dist/types/common/config/state/runtime.d.ts.map +1 -1
- package/dist/types/common/constants/runtime.d.ts.map +1 -1
- package/dist/types/common/harvest/harvest.d.ts.map +1 -1
- package/dist/types/common/session/session-entity.d.ts.map +1 -1
- package/dist/types/common/timer/interaction-timer.d.ts +2 -0
- package/dist/types/common/timer/interaction-timer.d.ts.map +1 -1
- package/dist/types/common/timing/time-keeper.d.ts +4 -9
- package/dist/types/common/timing/time-keeper.d.ts.map +1 -1
- package/dist/types/common/vitals/vital-metric.d.ts +1 -2
- package/dist/types/common/vitals/vital-metric.d.ts.map +1 -1
- package/dist/types/features/ajax/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/ajax/instrument/index.d.ts.map +1 -1
- package/dist/types/features/jserrors/aggregate/index.d.ts +2 -1
- package/dist/types/features/jserrors/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/jserrors/instrument/index.d.ts.map +1 -1
- package/dist/types/features/page_action/aggregate/index.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/types/features/page_view_timing/instrument/index.d.ts.map +1 -1
- package/dist/types/features/session_replay/aggregate/index.d.ts +9 -2
- package/dist/types/features/session_replay/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/session_replay/constants.d.ts +1 -0
- package/dist/types/features/session_replay/constants.d.ts.map +1 -1
- package/dist/types/features/session_replay/instrument/index.d.ts +1 -0
- package/dist/types/features/session_replay/instrument/index.d.ts.map +1 -1
- package/dist/types/features/session_replay/shared/recorder.d.ts.map +1 -1
- package/dist/types/features/session_replay/shared/utils.d.ts +8 -0
- package/dist/types/features/session_replay/shared/utils.d.ts.map +1 -1
- package/dist/types/features/session_trace/aggregate/index.d.ts +2 -1
- package/dist/types/features/session_trace/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/session_trace/instrument/index.d.ts.map +1 -1
- package/dist/types/features/soft_navigations/instrument/index.d.ts.map +1 -1
- package/dist/types/features/spa/aggregate/index.d.ts +0 -2
- package/dist/types/features/spa/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/utils/feature-base.d.ts +0 -1
- package/dist/types/features/utils/feature-base.d.ts.map +1 -1
- package/dist/types/loaders/agent-base.d.ts +0 -2
- package/dist/types/loaders/agent-base.d.ts.map +1 -1
- package/dist/types/loaders/api/api.d.ts.map +1 -1
- package/dist/types/loaders/configure/configure.d.ts.map +1 -1
- package/dist/types/loaders/micro-agent.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/common/config/state/runtime.js +2 -1
- package/src/common/constants/runtime.js +1 -1
- package/src/common/context/__mocks__/shared-context.js +3 -0
- package/src/common/context/shared-context.js +1 -1
- package/src/common/harvest/harvest.js +2 -2
- package/src/common/session/session-entity.js +2 -1
- package/src/common/timer/interaction-timer.js +17 -2
- package/src/common/timing/__mocks__/time-keeper.js +2 -0
- package/src/common/timing/time-keeper.js +25 -22
- package/src/common/vitals/cumulative-layout-shift.js +10 -4
- package/src/common/vitals/first-contentful-paint.js +9 -4
- package/src/common/vitals/first-input-delay.js +11 -6
- package/src/common/vitals/first-paint.js +1 -1
- package/src/common/vitals/interaction-to-next-paint.js +10 -3
- package/src/common/vitals/largest-contentful-paint.js +19 -15
- package/src/common/vitals/long-task.js +0 -1
- package/src/common/vitals/time-to-first-byte.js +5 -4
- package/src/common/vitals/vital-metric.js +2 -4
- package/src/common/window/nreum.js +1 -1
- package/src/features/ajax/aggregate/index.js +3 -2
- package/src/features/ajax/instrument/index.js +1 -1
- package/src/features/jserrors/aggregate/index.js +18 -8
- package/src/features/jserrors/instrument/index.js +10 -5
- package/src/features/page_action/aggregate/index.js +3 -2
- package/src/features/page_view_event/aggregate/index.js +11 -5
- package/src/features/page_view_timing/aggregate/index.js +16 -6
- package/src/features/page_view_timing/instrument/index.js +1 -1
- package/src/features/session_replay/aggregate/index.js +53 -31
- package/src/features/session_replay/constants.js +2 -1
- package/src/features/session_replay/instrument/index.js +7 -2
- package/src/features/session_replay/shared/recorder.js +23 -5
- package/src/features/session_replay/shared/utils.js +12 -0
- package/src/features/session_trace/aggregate/index.js +19 -17
- package/src/features/session_trace/instrument/index.js +1 -1
- package/src/features/soft_navigations/aggregate/index.js +2 -2
- package/src/features/soft_navigations/instrument/index.js +1 -1
- package/src/features/spa/aggregate/index.js +19 -8
- package/src/features/spa/instrument/index.js +1 -1
- package/src/features/utils/feature-base.js +0 -3
- package/src/loaders/agent-base.js +0 -2
- package/src/loaders/agent.js +1 -1
- package/src/loaders/api/api.js +11 -2
- package/src/loaders/configure/configure.js +1 -0
- package/src/loaders/micro-agent.js +4 -6
- package/src/common/vitals/__mocks__/web-vitals.js +0 -19
|
@@ -6,7 +6,6 @@ import { FEATURE_NAMES } from '../features/features';
|
|
|
6
6
|
import { getRuntime, setInfo, getInfo } from '../../common/config/config';
|
|
7
7
|
import { handle } from '../../common/event-emitter/handle';
|
|
8
8
|
import { ee } from '../../common/event-emitter/contextual-ee';
|
|
9
|
-
import { now } from '../../common/timing/now';
|
|
10
9
|
import { drain, registerDrain } from '../../common/drain/drain';
|
|
11
10
|
import { onWindowLoad } from '../../common/window/load';
|
|
12
11
|
import { isBrowserScope } from '../../common/constants/runtime';
|
|
@@ -15,6 +14,8 @@ import { SUPPORTABILITY_METRIC_CHANNEL } from '../../features/metrics/constants'
|
|
|
15
14
|
import { gosCDN } from '../../common/window/nreum';
|
|
16
15
|
import { apiMethods, asyncApiMethods } from './api-methods';
|
|
17
16
|
import { SR_EVENT_EMITTER_TYPES } from '../../features/session_replay/constants';
|
|
17
|
+
import { now } from '../../common/timing/now';
|
|
18
|
+
import { MODE } from '../../common/session/constants';
|
|
18
19
|
export function setTopLevelCallers() {
|
|
19
20
|
const nr = gosCDN();
|
|
20
21
|
apiMethods.forEach(f => {
|
|
@@ -38,12 +39,17 @@ export function setTopLevelCallers() {
|
|
|
38
39
|
return returnVals.length > 1 ? returnVals : returnVals[0];
|
|
39
40
|
}
|
|
40
41
|
}
|
|
42
|
+
const replayRunning = {};
|
|
41
43
|
export function setAPI(agentIdentifier, forceDrain) {
|
|
42
44
|
let runSoftNavOverSpa = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
43
45
|
if (!forceDrain) registerDrain(agentIdentifier, 'api');
|
|
44
46
|
const apiInterface = {};
|
|
45
47
|
var instanceEE = ee.get(agentIdentifier);
|
|
46
48
|
var tracerEE = instanceEE.get('tracer');
|
|
49
|
+
replayRunning[agentIdentifier] = MODE.OFF;
|
|
50
|
+
instanceEE.on(SR_EVENT_EMITTER_TYPES.REPLAY_RUNNING, isRunning => {
|
|
51
|
+
replayRunning[agentIdentifier] = isRunning;
|
|
52
|
+
});
|
|
47
53
|
var prefix = 'api-';
|
|
48
54
|
var spaPrefix = prefix + 'ixn-';
|
|
49
55
|
|
|
@@ -186,7 +192,7 @@ export function setAPI(agentIdentifier, forceDrain) {
|
|
|
186
192
|
apiInterface.noticeError = function (err, customAttributes) {
|
|
187
193
|
if (typeof err === 'string') err = new Error(err);
|
|
188
194
|
handle(SUPPORTABILITY_METRIC_CHANNEL, ['API/noticeError/called'], undefined, FEATURE_NAMES.metrics, instanceEE);
|
|
189
|
-
handle('err', [err, now(), false, customAttributes], undefined, FEATURE_NAMES.jserrors, instanceEE);
|
|
195
|
+
handle('err', [err, now(), false, customAttributes, !!replayRunning[agentIdentifier]], undefined, FEATURE_NAMES.jserrors, instanceEE);
|
|
190
196
|
};
|
|
191
197
|
|
|
192
198
|
// theres no window.load event on non-browser scopes, lazy load immediately
|
|
@@ -54,6 +54,7 @@ export function configure(agent) {
|
|
|
54
54
|
agent.runSoftNavOverSpa &&= updatedInit.soft_navigations.enabled === true && updatedInit.feature_flags.includes('soft_nav');
|
|
55
55
|
}
|
|
56
56
|
runtime.denyList = [...(updatedInit.ajax.deny_list || []), ...(updatedInit.ajax.block_internal ? internalTrafficList : [])];
|
|
57
|
+
runtime.ptid = agent.agentIdentifier;
|
|
57
58
|
setRuntime(agent.agentIdentifier, runtime);
|
|
58
59
|
if (agent.api === undefined) agent.api = setAPI(agent.agentIdentifier, forceDrain, agent.runSoftNavOverSpa);
|
|
59
60
|
if (agent.exposed === undefined) agent.exposed = exposed;
|
|
@@ -5,7 +5,6 @@ import { configure } from './configure/configure';
|
|
|
5
5
|
// core files
|
|
6
6
|
import { Aggregator } from '../common/aggregate/aggregator';
|
|
7
7
|
import { setNREUMInitializedAgent } from '../common/window/nreum';
|
|
8
|
-
import { generateRandomHexString } from '../common/ids/unique-id';
|
|
9
8
|
import { getConfiguration, getConfigurationValue, getInfo, getLoaderConfig, getRuntime } from '../common/config/config';
|
|
10
9
|
import { FEATURE_NAMES } from './features/features';
|
|
11
10
|
import { warn } from '../common/util/console';
|
|
@@ -23,15 +22,13 @@ export class MicroAgent extends AgentBase {
|
|
|
23
22
|
* @param {Object} options - Specifies features and runtime configuration,
|
|
24
23
|
* @param {string=} agentIdentifier - The optional unique ID of the agent.
|
|
25
24
|
*/
|
|
26
|
-
constructor(options) {
|
|
27
|
-
|
|
28
|
-
super();
|
|
29
|
-
this.agentIdentifier = agentIdentifier;
|
|
25
|
+
constructor(options, agentIdentifier) {
|
|
26
|
+
super(agentIdentifier);
|
|
30
27
|
this.sharedAggregator = new Aggregator({
|
|
31
28
|
agentIdentifier: this.agentIdentifier
|
|
32
29
|
});
|
|
33
30
|
this.features = {};
|
|
34
|
-
setNREUMInitializedAgent(agentIdentifier, this);
|
|
31
|
+
setNREUMInitializedAgent(this.agentIdentifier, this);
|
|
35
32
|
configure(this, {
|
|
36
33
|
...options,
|
|
37
34
|
runtime: {
|
|
@@ -46,7 +43,7 @@ export class MicroAgent extends AgentBase {
|
|
|
46
43
|
* @param {string|string[]|undefined} name The feature name(s) to start. If no name(s) are passed, all features will be started
|
|
47
44
|
*/
|
|
48
45
|
this.start = features => this.run(features);
|
|
49
|
-
this.run(nonAutoFeatures.filter(featureName => getConfigurationValue(agentIdentifier, "".concat(featureName, ".autoStart"))));
|
|
46
|
+
this.run(nonAutoFeatures.filter(featureName => getConfigurationValue(this.agentIdentifier, "".concat(featureName, ".autoStart"))));
|
|
50
47
|
}
|
|
51
48
|
get config() {
|
|
52
49
|
return {
|
|
@@ -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":"AAgCA,yCAIC;AAED,oDAKC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/common/constants/runtime.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,qCAEqB;AAErB;;GAEG;AACH,oCAeK;AAEL,oDAUI;AAEJ,oDAA6F;AAE7F,sCAA2F;AAE3F,qCAAyD;AAEzD,4BAA8E;AAE9E;;;;;;GAMG;AACH,iCAAwE;AAExE,+BAOI;AAEJ,2BAA2E;AAE3E,yCAAqE;AAErE,
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/common/constants/runtime.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,qCAEqB;AAErB;;GAEG;AACH,oCAeK;AAEL,oDAUI;AAEJ,oDAA6F;AAE7F,sCAA2F;AAE3F,qCAAyD;AAEzD,4BAA8E;AAE9E;;;;;;GAMG;AACH,iCAAwE;AAExE,+BAOI;AAEJ,2BAA2E;AAE3E,yCAAqE;AAErE,4BAAgE"}
|
|
@@ -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;IAEpD,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,CAsFnB;IAGD,iCAoBC;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;8BAvPY,OAAO,YAAY,EAAE,eAAe;wCACpC,OAAO,YAAY,EAAE,yBAAyB;6BAC9C,OAAO,YAAY,EAAE,cAAc;qCACnC,OAAO,YAAY,EAAE,sBAAsB;4CAC3C,OAAO,YAAY,EAAE,6BAA6B;
|
|
1
|
+
{"version":3,"file":"harvest.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/harvest.js"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH;IAII,0BAA2H;IAC3H,uBAAoD;IAEpD,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,CAsFnB;IAGD,iCAoBC;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;8BAvPY,OAAO,YAAY,EAAE,eAAe;wCACpC,OAAO,YAAY,EAAE,yBAAyB;6BAC9C,OAAO,YAAY,EAAE,cAAc;qCACnC,OAAO,YAAY,EAAE,sBAAsB;4CAC3C,OAAO,YAAY,EAAE,6BAA6B;8BAbjC,2BAA2B;2BAF9B,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-entity.d.ts","sourceRoot":"","sources":["../../../../src/common/session/session-entity.js"],"names":[],"mappings":"AA6BA;IACE;;;;;OAKG;IACH,uBA0BC;IApBC,qBAAsC;IACtC,aAAsB;IACtB,UAAe;IAGf,SAAc;IAEd,QAAiC;IAenC;;;;
|
|
1
|
+
{"version":3,"file":"session-entity.d.ts","sourceRoot":"","sources":["../../../../src/common/session/session-entity.js"],"names":[],"mappings":"AA6BA;IACE;;;;;OAKG;IACH,uBA0BC;IApBC,qBAAsC;IACtC,aAAsB;IACtB,UAAe;IAGf,SAAc;IAEd,QAAiC;IAenC;;;;aAyEC;IAlEC,8BAA0B;IAC1B,+BAA4B;IAc1B,gCAOqC;IAUrC,4CAkBsC;IAexC,iCAAuB;IAIzB,wBAEC;IAED,sBAEC;IAED;;;OAGG;IACH,QAFa,MAAM,CA6BlB;IAED;;;;;;OAMG;IACH,YAHW,MAAM,GACJ,MAAM,CAkBlB;IAED,gBAuBC;IAED;;OAEG;IACH,gBAIC;IAED;;;OAGG;IACH,qBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;OAGG;IACH,gBAHW,MAAM,GACJ,OAAO,CAKnB;IAED,yDAUC;IAED,6DAIC;IAED;;;OAGG;IACH,6BAHW,MAAM,GACJ,MAAM,CAIlB;IAED,gDAaC;IAHG,YAAuD;CAI5D;sBArSqB,gBAAgB;iCAGL,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IAE1F,mDAAmD;IACnD,iBAAmC;IAGnC,gCAA4B;IAM1B,6CAA4C;IAO1C,QAAiB;IAEjB,kDAIC;IAoBP,cAQC;IAED,cAIC;IAED,eAeC;IAED,gCAMC;CACF;sBA/FqB,SAAS"}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* to the harvested data event offset time.
|
|
5
5
|
*/
|
|
6
6
|
export class TimeKeeper {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
get
|
|
7
|
+
get ready(): number;
|
|
8
|
+
get originTime(): number;
|
|
9
|
+
get correctedOriginTime(): number;
|
|
10
10
|
/**
|
|
11
11
|
* Process a rum request to calculate NR server time.
|
|
12
12
|
* @param rumRequest {XMLHttpRequest} The xhr for the rum request
|
|
@@ -18,7 +18,7 @@ export class TimeKeeper {
|
|
|
18
18
|
* Converts a page origin relative time to an absolute timestamp
|
|
19
19
|
* corrected to NR server time.
|
|
20
20
|
* @param relativeTime {number} The relative time of the event in milliseconds
|
|
21
|
-
* @returns {number}
|
|
21
|
+
* @returns {number} Corrected unix/epoch timestamp
|
|
22
22
|
*/
|
|
23
23
|
convertRelativeTimestamp(relativeTime: number): number;
|
|
24
24
|
/**
|
|
@@ -27,11 +27,6 @@ export class TimeKeeper {
|
|
|
27
27
|
* @return {number} Corrected unix/epoch timestamp
|
|
28
28
|
*/
|
|
29
29
|
correctAbsoluteTimestamp(timestamp: number): number;
|
|
30
|
-
/**
|
|
31
|
-
* Returns the current time offset from page origin.
|
|
32
|
-
* @return {number}
|
|
33
|
-
*/
|
|
34
|
-
now(): number;
|
|
35
30
|
#private;
|
|
36
31
|
}
|
|
37
32
|
//# sourceMappingURL=time-keeper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-keeper.d.ts","sourceRoot":"","sources":["../../../../src/common/timing/time-keeper.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"time-keeper.d.ts","sourceRoot":"","sources":["../../../../src/common/timing/time-keeper.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;IA+BE,oBAEC;IAED,yBAEC;IAED,kCAEC;IAED;;;;;OAKG;IACH,8BAJsB,cAAc,aACf,MAAM,WACR,MAAM,QAoBxB;IAED;;;;;OAKG;IACH,uCAHwB,MAAM,GACjB,MAAM,CAIlB;IAED;;;;OAIG;IACH,oCAHqB,MAAM,GACf,MAAM,CAIjB;;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vital-metric.d.ts","sourceRoot":"","sources":["../../../../src/common/vitals/vital-metric.js"],"names":[],"mappings":"AAAA;IAIE,4CAIC;IAND,eAAY;IAGV,UAAgB;IAChB,UAAe;IACf,oBAAwF;IAG1F
|
|
1
|
+
{"version":3,"file":"vital-metric.d.ts","sourceRoot":"","sources":["../../../../src/common/vitals/vital-metric.js"],"names":[],"mappings":"AAAA;IAIE,4CAIC;IAND,eAAY;IAGV,UAAgB;IAChB,UAAe;IACf,oBAAwF;IAG1F;;;aAgBC;IAED,mBAMC;IAED,uBAEC;IAED,uEAMC;;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/ajax/aggregate/index.js"],"names":[],"mappings":"AAkBA;IACE,2BAAiC;IACjC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/ajax/aggregate/index.js"],"names":[],"mappings":"AAkBA;IACE,2BAAiC;IACjC,mDAmPC;IAvNC,uFAAwB;IACxB;;;;eAAoC;IACpC;;;MAA2E;CAsN9E;8BA1P6B,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/ajax/instrument/index.js"],"names":[],"mappings":"AA0BA;IACE,2BAAiC;IACjC,mEAqCC;IA/BC,mBAAiC;IAEjC,4EAAkF;CA8BrF;+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/ajax/instrument/index.js"],"names":[],"mappings":"AA0BA;IACE,2BAAiC;IACjC,mEAqCC;IA/BC,mBAAiC;IAEjC,4EAAkF;CA8BrF;+BApD8B,6BAA6B;mBAFzC,uBAAuB"}
|
|
@@ -10,6 +10,7 @@ export class Aggregate extends AggregateBase {
|
|
|
10
10
|
bufferedErrorsUnderSpa: {};
|
|
11
11
|
currentBody: {} | null | undefined;
|
|
12
12
|
errorOnPage: boolean;
|
|
13
|
+
replayAborted: boolean;
|
|
13
14
|
onHarvestStarted(options: any): {
|
|
14
15
|
body: {} | null;
|
|
15
16
|
qs: {};
|
|
@@ -25,7 +26,7 @@ export class Aggregate extends AggregateBase {
|
|
|
25
26
|
* @returns {string} A canonical stack string built from the URLs and function names in the given `stackInfo` object.
|
|
26
27
|
*/
|
|
27
28
|
buildCanonicalStackString(stackInfo: StackInfo): string;
|
|
28
|
-
storeError(err: any, time: any, internal: any, customAttributes: any): void;
|
|
29
|
+
storeError(err: any, time: any, internal: any, customAttributes: any, hasReplay: any): void;
|
|
29
30
|
onInteractionDone(interaction: any, wasSaved: any): void;
|
|
30
31
|
onSoftNavNotification(interactionId: any, wasFinished: any, softNavAttrs: any): void;
|
|
31
32
|
#private;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/jserrors/aggregate/index.js"],"names":[],"mappings":"AAyBA;;GAEG;AAEH;IACE,2BAAiC;IACjC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/jserrors/aggregate/index.js"],"names":[],"mappings":"AAyBA;;GAEG;AAEH;IACE,2BAAiC;IACjC,mDAmCC;IAhCC,kBAAuB;IACvB,eAAoB;IACpB,qBAA0B;IAC1B,2BAAgC;IAChC,mCAA4B;IAC5B,qBAAwB;IACxB,uBAA0B;IA4B5B;;;MA2BC;IAED,qCAWC;IAED,8BAEC;IAED,oEAMC;IAED;;;;;;OAMG;IACH,qCAHW,SAAS,GACP,MAAM,CAgBlB;IAED,4FAsFC;IA4BD,yDA6BC;IAED,qFAOC;;CACF;wBAhRY,OAAO,0BAA0B,EAAE,SAAS;8BAN3B,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/jserrors/instrument/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/jserrors/instrument/index.js"],"names":[],"mappings":"AAgBA;IACE,2BAAiC;IAKjC,mEA+CC;IA1CG,2CAA0C;IAwC5C,yBAA+B;;CAoFlC;+BAjJ8B,6BAA6B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_action/aggregate/index.js"],"names":[],"mappings":"AAgBA;IACE,2BAAiC;IACjC,mDA2BC;IAzBC,wBAA0B;IAC1B,wBAAsL;IACtL,yBAA2E;IAC3E,gCAA4B;IAC5B,wCAA8B;IAE9B,cAAgB;IAEhB,SAAqD;IAmBvD;;;;;;;;MAkBC;IAED,qCAKC;IAGD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_action/aggregate/index.js"],"names":[],"mappings":"AAgBA;IACE,2BAAiC;IACjC,mDA2BC;IAzBC,wBAA0B;IAC1B,wBAAsL;IACtL,yBAA2E;IAC3E,gCAA4B;IAC5B,wCAA8B;IAE9B,cAAgB;IAEhB,SAAqD;IAmBvD;;;;;;;;MAkBC;IAED,qCAKC;IAGD,wDAqCC;CACF;8BApG6B,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_event/aggregate/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_event/aggregate/index.js"],"names":[],"mappings":"AAoBA;IACE,2BAA2C;IAC3C,mDAoBC;IAjBC,wBAAwB;IACxB,8BAA8B;IAC9B,8BAA8B;IAiBhC,gBAmGC;CACF;8BAvI6B,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_timing/aggregate/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_timing/aggregate/index.js"],"names":[],"mappings":"AAyBA;IACE,2BAAiC;IAMjC,mDA2CC;IAxCC,eAAiB;IACjB,mBAAqB;IACrB,4BAA+B;IAwCjC;;;OAGG;IACH,6BAFW,MAAM,QAOhB;IAED;;OAEG;IACH,uCAUC;IAED,mDAuBC;IAED,qCAKC;IAED,gDAWC;IAGD;;;;kBAWC;IAGD,8BAuBC;;CACF;8BA9K6B,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_timing/instrument/index.js"],"names":[],"mappings":"AAYA;IACE,2BAAiC;IACjC,mEAWC;CACF;+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_timing/instrument/index.js"],"names":[],"mappings":"AAYA;IACE,2BAAiC;IACjC,mEAWC;CACF;+BAnB8B,6BAA6B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export class Aggregate extends AggregateBase {
|
|
2
2
|
static featureName: string;
|
|
3
3
|
constructor(agentIdentifier: any, aggregator: any, args: any);
|
|
4
|
+
mode: number;
|
|
4
5
|
/** The interval to harvest at. This gets overridden if the size of the payload exceeds certain thresholds */
|
|
5
6
|
harvestTimeSeconds: any;
|
|
6
7
|
/** Set once the recorder has fully initialized after flag checks and sampling */
|
|
@@ -9,12 +10,15 @@ export class Aggregate extends AggregateBase {
|
|
|
9
10
|
gzipper: typeof import("fflate").gzipSync | undefined;
|
|
10
11
|
/** populated with the u8 string lib async */
|
|
11
12
|
u8: typeof import("fflate").strToU8 | undefined;
|
|
12
|
-
mode: any;
|
|
13
13
|
/** set by BCS response */
|
|
14
14
|
entitled: boolean;
|
|
15
|
+
/** set at BCS response, stored in runtime */
|
|
16
|
+
timeKeeper: any;
|
|
15
17
|
recorder: any;
|
|
18
|
+
preloaded: boolean;
|
|
19
|
+
errorNoticed: any;
|
|
16
20
|
scheduler: HarvestScheduler;
|
|
17
|
-
|
|
21
|
+
handleError(e: any): void;
|
|
18
22
|
switchToFull(): void;
|
|
19
23
|
/**
|
|
20
24
|
* Evaluate entitlements and sampling before starting feature mechanics, importing and configuring recording library, and setting storage state
|
|
@@ -34,16 +38,19 @@ export class Aggregate extends AggregateBase {
|
|
|
34
38
|
type: string;
|
|
35
39
|
app_id: any;
|
|
36
40
|
protocol_version: string;
|
|
41
|
+
timestamp: any;
|
|
37
42
|
attributes: string;
|
|
38
43
|
};
|
|
39
44
|
body: any;
|
|
40
45
|
}[] | undefined;
|
|
46
|
+
getCorrectedTimestamp(node: any): any;
|
|
41
47
|
getHarvestContents(recorderEvents: any): {
|
|
42
48
|
qs: {
|
|
43
49
|
browser_monitoring_key: any;
|
|
44
50
|
type: string;
|
|
45
51
|
app_id: any;
|
|
46
52
|
protocol_version: string;
|
|
53
|
+
timestamp: any;
|
|
47
54
|
attributes: string;
|
|
48
55
|
};
|
|
49
56
|
body: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/aggregate/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/aggregate/index.js"],"names":[],"mappings":"AAgCA;IACE,2BAAiC;IAIjC,8DAsGC;IAzGD,aAAe;IAKb,8GAA8G;IAC9G,wBAAgH;IAChH,iFAAiF;IACjF,qBAAwB;IAGxB,2CAA2C;IAC3C,sDAAwB;IACxB,6CAA6C;IAC7C,gDAAmB;IAEnB,0BAA0B;IAC1B,kBAAqB;IACrB,6CAA6C;IAC7C,gBAA2B;IAE3B,cAA8B;IAC9B,mBAAgC;IAChC,kBAA+C;IA4B/C,4BAKQ;IAmDV,0BAMC;IAED,qBAWC;IAED;;;;;;;OAOG;IACH,iCALW,OAAO,cACP,OAAO,iBACP,OAAO,GACL,IAAI,CA8DhB;IAED,2BASC;IAED;;;;;;;;;;;;oBAiDC;IAED,sCAIC;IAED;;;;;;;;;;MAoEC;IAED,qCAOC;IAED;;;;OAIG;IACH,mCAKC;IAED,yDAAyD;IACzD,yBAUC;IAED,yCAGC;CACF;8BAxY6B,4BAA4B;iCAHzB,2CAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/features/session_replay/constants.js"],"names":[],"mappings":"AAGA,kCAAuD
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/features/session_replay/constants.js"],"names":[],"mappings":"AAGA,kCAAuD;;;;;;AAQvD,mCAAmC;;;;;;;;;AASnC,uCAAuC;AACvC,uCAAuC;AACvC,iCAAiC;AACjC,uCAAuC;AACvC,2GAA2G;AAC3G;;EAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BtF,0CAA0C;AAC1C,uCAAuC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/instrument/index.js"],"names":[],"mappings":"AAgBA;IACE,2BAAiC;IACjC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/instrument/index.js"],"names":[],"mappings":"AAgBA;IACE,2BAAiC;IACjC,mEAiBC;IAPK,sBAAwB;IAwB5B,4DAA0F;;CAK7F;+BA7C8B,6BAA6B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/shared/recorder.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/shared/recorder.js"],"names":[],"mappings":"AAYA;IAUE,yBAkBC;IAdC,iEAAiE;IACjE,mBAAsB;IACtB,6DAA6D;IAC7D,oCAAuC;IACvC,kIAAkI;IAClI,kBAAqB;IACrB,sDAAsD;IACtD,YAAoB;IACpB,oEAAoE;IACpE,6BAAqH;IACrH,0FAA0F;IAC1F,eAA6C;IAC7C,uIAAuI;IACvI,0BAAyE;IAG3E;;;;;;;;;MAYC;IAED,mFAAmF;IACnF,oBAKC;IAED,qDAAqD;IACrD,uBAiCC;IAED;;;;;OAKG;IACH,yCA0BC;IAED,0HAA0H;IAC1H,yCAgDC;IAED,0HAA0H;IAC1H,yBAOC;IAED,wBAEC;IAED,gCAAgC;IAChC,uCAGC;IAED;;;SAGK;IACL,oCAGC;;CACF;+BAjN8B,mBAAmB"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export function isPreloadAllowed(agentId: any): any;
|
|
2
2
|
export function canImportReplayAgg(agentId: any, sessionMgr: any): boolean;
|
|
3
|
+
export function buildNRMetaNode(timestamp: any, timeKeeper: any): {
|
|
4
|
+
originalTimestamp: any;
|
|
5
|
+
correctedTimestamp: any;
|
|
6
|
+
timestampDiff: number;
|
|
7
|
+
timeKeeperOriginTime: any;
|
|
8
|
+
timeKeeperCorrectedOriginTime: any;
|
|
9
|
+
timeKeeperDiff: number;
|
|
10
|
+
};
|
|
3
11
|
export function enableSessionTracking(agentId: any): boolean;
|
|
4
12
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/shared/utils.js"],"names":[],"mappings":"AAWA,oDAEC;AAED,2EAGC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/shared/utils.js"],"names":[],"mappings":"AAWA,oDAEC;AAED,2EAGC;AAED;;;;;;;EAUC;AA3BM,6DAA+H"}
|
|
@@ -3,10 +3,11 @@ export class Aggregate extends AggregateBase {
|
|
|
3
3
|
constructor(agentIdentifier: any, aggregator: any, argsObj: any);
|
|
4
4
|
agentRuntime: any;
|
|
5
5
|
resourceObserver: any;
|
|
6
|
-
ptid:
|
|
6
|
+
ptid: any;
|
|
7
7
|
trace: {} | undefined;
|
|
8
8
|
nodeCount: number | undefined;
|
|
9
9
|
sentTrace: {} | null | undefined;
|
|
10
|
+
everSent: boolean | undefined;
|
|
10
11
|
harvestTimeSeconds: any;
|
|
11
12
|
maxNodesPerHarvest: any;
|
|
12
13
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_trace/aggregate/index.js"],"names":[],"mappings":"AAiCA;IACE,2BAAiC;IAGjC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_trace/aggregate/index.js"],"names":[],"mappings":"AAiCA;IACE,2BAAiC;IAGjC,iEA6IC;IA3IC,kBAA+C;IAK/C,sBAAiD;IACjD,UAAkC;IAClC,sBAAe;IACf,8BAAkB;IAClB,iCAAqB;IACrB,8BAAqB;IACrB,wBAA0G;IAC1G,wBAA4G;IAC5G;;4EAEwE;IACxE,kCAAyB;IAGzB,0CAAsC;IA0HxC,sEAcC;IA8CD,oDAOC;IAGD,oCAwBC;IAGD,uEAkBC;IAED,oDAKC;IAED,wBAwBC;IAED,uCAuBC;IAGD,gDASC;IAID,qCAkBC;IAGD,qEAUC;IAGD,mEAUC;IAGD,yBAeC;IAED;;;;OAIG;IACH,2BAHW,MAAM,GACJ,MAAM,CAsBlB;IAGD;;;;;;;YAkCM;0GAC8F;;YAE9F;0FAC8E;;YAE9E,4IAA4I;;;;;;MAMjJ;IAED,mEA6BC;;CACF;8BAhhB6B,4BAA4B;6BAF7B,2BAA2B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_trace/instrument/index.js"],"names":[],"mappings":"AAgBA;IACE,2BAAiC;IACjC,mEAsCC;IAhCC,6BAA4C;CAiC/C;+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_trace/instrument/index.js"],"names":[],"mappings":"AAgBA;IACE,2BAAiC;IACjC,mEAsCC;IAhCC,6BAA4C;CAiC/C;+BAnD8B,6BAA6B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/instrument/index.js"],"names":[],"mappings":"AAgBA;IACE,2BAAiC;IACjC,mEA+CC;IAnCG,2CAA0C;CAoC/C;+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/instrument/index.js"],"names":[],"mappings":"AAgBA;IACE,2BAAiC;IACjC,mEA+CC;IAnCG,2CAA0C;CAoC/C;+BA5D8B,6BAA6B"}
|
|
@@ -20,9 +20,7 @@ export class Aggregate extends AggregateBase {
|
|
|
20
20
|
disableSpaFix: boolean;
|
|
21
21
|
};
|
|
22
22
|
serializer: Serializer;
|
|
23
|
-
scheduler: HarvestScheduler;
|
|
24
23
|
}
|
|
25
24
|
import { AggregateBase } from '../../utils/aggregate-base';
|
|
26
25
|
import { Serializer } from './serializer';
|
|
27
|
-
import { HarvestScheduler } from '../../../common/harvest/harvest-scheduler';
|
|
28
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/spa/aggregate/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/spa/aggregate/index.js"],"names":[],"mappings":"AAiCA;IACE,2BAAiC;IACjC,mDAktBC;IA9sBC;;;;;;;;;;;;;;;;;MAkBC;IAGD,uBAAsC;CA0rBzC;8BAnuB6B,4BAA4B;2BAJ/B,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-base.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/feature-base.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature-base.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/feature-base.js"],"names":[],"mappings":"AAEA;IACE,qEAeC;IAdC,qBAAqB;IACrB,iBADW,MAAM,CACqB;IACtC,qEAAqE;IACrE,YADW,OAAO,mCAAmC,EAAE,UAAU,CACrC;IAC5B,oEAAoE;IACpE,QAAiC;IACjC,qBAAqB;IACrB,aADW,MAAM,CACa;IAC9B;;;;OAIG;IACH,SAFU,OAAO,CAEG;CAEvB"}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
export class AgentBase {
|
|
5
5
|
constructor(agentIdentifier?: string);
|
|
6
6
|
agentIdentifier: string;
|
|
7
|
-
timeKeeper: TimeKeeper;
|
|
8
7
|
/**
|
|
9
8
|
* Reports a browser PageAction event along with a name and optional attributes.
|
|
10
9
|
* {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/addpageaction/}
|
|
@@ -124,5 +123,4 @@ export class AgentBase {
|
|
|
124
123
|
#private;
|
|
125
124
|
}
|
|
126
125
|
export type InteractionInstance = import('./api/interaction-types').InteractionInstance;
|
|
127
|
-
import { TimeKeeper } from '../common/timing/time-keeper';
|
|
128
126
|
//# sourceMappingURL=agent-base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-base.d.ts","sourceRoot":"","sources":["../../../src/loaders/agent-base.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-base.d.ts","sourceRoot":"","sources":["../../../src/loaders/agent-base.js"],"names":[],"mappings":"AAMA;;GAEG;AAEH;IAGE,sCAEC;IAJD,wBAAe;IAgBf;;;;;OAKG;IACH,oBAHW,MAAM,wCAKhB;IAED;;;;;OAKG;IACH,sBAHW,MAAM,kCAKhB;IAED;;;;;;OAMG;IACH,yBAJW,MAAM,SACN,MAAM,GAAC,MAAM,GAAC,IAAI,sCAK5B;IAED;;;;;OAKG;IACH,mBAHW,KAAK,GAAC,MAAM,8CAKtB;IAED;;;;OAIG;IACH,iBAFW,MAAM,GAAC,IAAI,OAIrB;IAED;;;;;;;OAOG;IACH,6BAJW,MAAM,GAAC,IAAI,OAMrB;IAED;;;;OAIG;IACH,kCAFmB,KAAK,GAAC,MAAM,KAAK,OAAO,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,OAI9D;IAED;;;;OAIG;IACH,8CAEC;IAED;;;;;OAKG;IACH,iBAHW,MAAM,MACN,MAAM,OAIhB;IAED;;;;OAIG;IACH,yDAEC;IAED;;;;OAIG;IACH,oBAEC;IAED;;;;;OAKG;IACH,mBAEC;IAED;;;;;;;;;;OAUG;IACH,6BARW;QAAC,MAAM,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAC,OAUrF;IAED;;;;;OAKG;IACH,0BAHW,MAAM,OAKhB;IAED;;;;;MAKE;IACF,eAHa,mBAAmB,CAK/B;;CACF;kCA5KY,OAAO,yBAAyB,EAAE,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/loaders/api/api.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/loaders/api/api.js"],"names":[],"mappings":"AAmBA,2CAeC;AAID;;;;IAuDE;;;;OAIG;qBAFQ,MAAM;IAWjB;;;;OAIG;iCAFQ,MAAM,GAAC,IAAI;;;;;EA0GvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/loaders/configure/configure.js"],"names":[],"mappings":"AASA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/loaders/configure/configure.js"],"names":[],"mappings":"AASA;;GAEG;AACH,oGAgDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"micro-agent.d.ts","sourceRoot":"","sources":["../../../src/loaders/micro-agent.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"micro-agent.d.ts","sourceRoot":"","sources":["../../../src/loaders/micro-agent.js"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH;IACE;;;OAGG;IACH,qBAHW,MAAM,oBACN,MAAM,cAmBhB;IAdC,6BAAiF;IACjF,aAAkB;IAMlB;;;;OAIG;IACH,yCAA2C;IAI7C;;;;;MAOC;IAED,mCAyCC;CACF;0BAxFyB,cAAc;2BANb,gCAAgC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newrelic/browser-agent",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.256.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "New Relic Browser Agent Team <browser-agent@newrelic.com>",
|
|
6
6
|
"description": "New Relic Browser Agent",
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
"dependencies": {
|
|
169
169
|
"core-js": "^3.26.0",
|
|
170
170
|
"fflate": "^0.7.4",
|
|
171
|
-
"rrweb": "2.0.0-alpha.
|
|
171
|
+
"rrweb": "2.0.0-alpha.12",
|
|
172
172
|
"web-vitals": "^3.1.0"
|
|
173
173
|
},
|
|
174
174
|
"devDependencies": {
|
|
@@ -74,4 +74,4 @@ export const isIE = Boolean(isBrowserScope && window.document.documentMode) // d
|
|
|
74
74
|
|
|
75
75
|
export const supportsSendBeacon = !!globalScope.navigator?.sendBeacon
|
|
76
76
|
|
|
77
|
-
export const offset = Math.floor(
|
|
77
|
+
export const offset = Math.floor(Date.now() - performance.now())
|
|
@@ -15,7 +15,7 @@ export class SharedContext {
|
|
|
15
15
|
if (Object.keys(model).includes(key)) this.sharedContext[key] = value
|
|
16
16
|
})
|
|
17
17
|
} catch (err) {
|
|
18
|
-
warn('An error
|
|
18
|
+
warn('An error occurred while setting SharedContext', err)
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -9,7 +9,6 @@ import * as submitData from '../util/submit-data'
|
|
|
9
9
|
import { getLocation } from '../url/location'
|
|
10
10
|
import { getInfo, getConfigurationValue, getRuntime, getConfiguration } from '../config/config'
|
|
11
11
|
import { cleanURL } from '../url/clean-url'
|
|
12
|
-
import { now } from '../timing/now'
|
|
13
12
|
import { eventListenerOpts } from '../event-listener/event-listener-opts'
|
|
14
13
|
import { Obfuscator } from '../util/obfuscate'
|
|
15
14
|
import { applyFnToProps } from '../util/traverse'
|
|
@@ -17,6 +16,7 @@ import { SharedContext } from '../context/shared-context'
|
|
|
17
16
|
import { VERSION } from '../constants/env'
|
|
18
17
|
import { isWorkerScope, isIE } from '../constants/runtime'
|
|
19
18
|
import { warn } from '../util/console'
|
|
19
|
+
import { now } from '../timing/now'
|
|
20
20
|
|
|
21
21
|
const warnings = {}
|
|
22
22
|
|
|
@@ -145,7 +145,7 @@ export class Harvest extends SharedContext {
|
|
|
145
145
|
result.addEventListener('loadend', function () {
|
|
146
146
|
// `this` refers to the XHR object in this scope, do not change this to a fat arrow
|
|
147
147
|
// status 0 refers to a local error, such as CORS or network failure, or a blocked request by the browser (e.g. adblocker)
|
|
148
|
-
const cbResult = { sent: this.status !== 0, status: this.status, xhr: this, fullUrl }
|
|
148
|
+
const cbResult = { sent: this.status !== 0, status: this.status, failed: this.status === 0 || this.status >= 400, xhr: this, fullUrl }
|
|
149
149
|
if (this.status === 429) {
|
|
150
150
|
cbResult.retry = true
|
|
151
151
|
cbResult.delay = harvestScope.tooManyRequestsDelay
|
|
@@ -117,7 +117,8 @@ export class SessionEntity {
|
|
|
117
117
|
this.write(getModeledObject(this.state, model))
|
|
118
118
|
},
|
|
119
119
|
ee: this.ee,
|
|
120
|
-
refreshEvents: ['click', 'keydown', 'scroll']
|
|
120
|
+
refreshEvents: ['click', 'keydown', 'scroll'],
|
|
121
|
+
readStorage: () => this.storage.get(this.lookupKey)
|
|
121
122
|
}, this.state.inactiveAt - Date.now())
|
|
122
123
|
} else {
|
|
123
124
|
this.state.inactiveAt = Infinity
|
|
@@ -10,6 +10,9 @@ export class InteractionTimer extends Timer {
|
|
|
10
10
|
this.onRefresh = typeof opts.onRefresh === 'function' ? opts.onRefresh : () => { /* noop */ }
|
|
11
11
|
this.onResume = typeof opts.onResume === 'function' ? opts.onResume : () => { /* noop */ }
|
|
12
12
|
|
|
13
|
+
/** used to double-check LS state at resume time */
|
|
14
|
+
this.readStorage = opts.readStorage
|
|
15
|
+
|
|
13
16
|
// used by pause/resume
|
|
14
17
|
this.remainingMs = undefined
|
|
15
18
|
|
|
@@ -67,8 +70,20 @@ export class InteractionTimer extends Timer {
|
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
resume () {
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
try {
|
|
74
|
+
const lsData = this.readStorage()
|
|
75
|
+
const obj = typeof lsData === 'string' ? JSON.parse(lsData) : lsData
|
|
76
|
+
if (isExpired(obj.expiresAt) || isExpired(obj.inactiveAt)) this.end()
|
|
77
|
+
else {
|
|
78
|
+
this.refresh()
|
|
79
|
+
this.onResume() // emit resume event after state updated
|
|
80
|
+
}
|
|
81
|
+
} catch (err) {
|
|
82
|
+
this.end()
|
|
83
|
+
}
|
|
84
|
+
function isExpired (timestamp) {
|
|
85
|
+
return Date.now() > timestamp
|
|
86
|
+
}
|
|
72
87
|
}
|
|
73
88
|
|
|
74
89
|
refresh (cb, ms) {
|