@newrelic/browser-agent 1.320.1 → 1.321.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 +15 -0
- package/dist/cjs/common/config/runtime.js +3 -0
- package/dist/cjs/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/common/dom/selector-path.js +1 -1
- package/dist/cjs/common/event-listener/event-listener-opts.js +1 -1
- package/dist/cjs/common/harvest/connector.js +202 -0
- package/dist/cjs/common/harvest/harvester.js +5 -8
- package/dist/cjs/common/harvest/send.js +8 -7
- package/dist/cjs/common/session/session-entity.js +1 -1
- package/dist/cjs/common/timer/interaction-timer.js +2 -2
- package/dist/cjs/common/unload/eol.js +3 -3
- package/dist/cjs/common/util/console.js +2 -1
- package/dist/cjs/common/util/feature-flags.js +2 -1
- package/dist/cjs/common/v2/constants.js +21 -0
- package/dist/cjs/common/v2/utils.js +25 -23
- package/dist/cjs/common/window/page-visibility.js +1 -1
- package/dist/cjs/common/wrap/wrap-events.js +4 -3
- package/dist/cjs/common/wrap/wrap-fetch.js +2 -2
- package/dist/cjs/common/wrap/wrap-function.js +1 -1
- package/dist/cjs/common/wrap/wrap-history.js +3 -2
- package/dist/cjs/common/wrap/wrap-xhr.js +2 -2
- package/dist/cjs/features/ajax/aggregate/index.js +1 -1
- package/dist/cjs/features/generic_events/aggregate/index.js +1 -1
- package/dist/cjs/features/generic_events/instrument/index.js +1 -1
- package/dist/cjs/features/jserrors/aggregate/index.js +5 -5
- package/dist/cjs/features/logging/instrument/index.js +1 -1
- package/dist/cjs/features/page_view_event/aggregate/index.js +2 -6
- package/dist/cjs/features/page_view_event/aggregate_v2/index.js +109 -0
- package/dist/cjs/features/page_view_event/instrument/index.js +6 -1
- package/dist/cjs/features/page_view_timing/aggregate/index.js +5 -1
- package/dist/cjs/features/session_replay/instrument/index.js +9 -0
- package/dist/cjs/features/session_replay/shared/recorder.js +2 -1
- package/dist/cjs/features/session_replay/shared/utils.js +3 -5
- package/dist/cjs/features/session_trace/instrument/index.js +3 -3
- package/dist/cjs/features/soft_navigations/instrument/index.js +2 -2
- package/dist/cjs/features/utils/aggregate-base.js +0 -12
- package/dist/cjs/features/utils/instrument-base.js +72 -29
- package/dist/cjs/loaders/agent.js +2 -1
- package/dist/cjs/loaders/api/consent.js +2 -2
- package/dist/cjs/loaders/api/register.js +26 -13
- package/dist/cjs/loaders/configure/configure.js +14 -0
- package/dist/cjs/loaders/features/features.js +2 -1
- package/dist/esm/common/config/runtime.js +3 -0
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/common/dom/selector-path.js +1 -1
- package/dist/esm/common/event-listener/event-listener-opts.js +1 -1
- package/dist/esm/common/harvest/connector.js +195 -0
- package/dist/esm/common/harvest/harvester.js +5 -8
- package/dist/esm/common/harvest/send.js +10 -9
- package/dist/esm/common/session/session-entity.js +1 -1
- package/dist/esm/common/timer/interaction-timer.js +2 -2
- package/dist/esm/common/unload/eol.js +3 -3
- package/dist/esm/common/util/console.js +2 -1
- package/dist/esm/common/util/feature-flags.js +2 -1
- package/dist/esm/common/v2/constants.js +15 -0
- package/dist/esm/common/v2/utils.js +24 -22
- package/dist/esm/common/window/page-visibility.js +1 -1
- package/dist/esm/common/wrap/wrap-events.js +4 -3
- package/dist/esm/common/wrap/wrap-fetch.js +2 -2
- package/dist/esm/common/wrap/wrap-function.js +1 -1
- package/dist/esm/common/wrap/wrap-history.js +3 -2
- package/dist/esm/common/wrap/wrap-xhr.js +2 -2
- package/dist/esm/features/ajax/aggregate/index.js +2 -2
- package/dist/esm/features/generic_events/aggregate/index.js +1 -1
- package/dist/esm/features/generic_events/instrument/index.js +1 -1
- package/dist/esm/features/jserrors/aggregate/index.js +6 -6
- package/dist/esm/features/logging/instrument/index.js +1 -1
- package/dist/esm/features/page_view_event/aggregate/index.js +2 -6
- package/dist/esm/features/page_view_event/aggregate_v2/index.js +100 -0
- package/dist/esm/features/page_view_event/instrument/index.js +6 -1
- package/dist/esm/features/page_view_timing/aggregate/index.js +5 -1
- package/dist/esm/features/session_replay/instrument/index.js +9 -0
- package/dist/esm/features/session_replay/shared/recorder.js +2 -1
- package/dist/esm/features/session_replay/shared/utils.js +3 -5
- package/dist/esm/features/session_trace/instrument/index.js +3 -3
- package/dist/esm/features/soft_navigations/instrument/index.js +2 -2
- package/dist/esm/features/utils/aggregate-base.js +0 -12
- package/dist/esm/features/utils/instrument-base.js +71 -28
- package/dist/esm/loaders/agent.js +2 -1
- package/dist/esm/loaders/api/consent.js +2 -2
- package/dist/esm/loaders/api/register.js +19 -6
- package/dist/esm/loaders/configure/configure.js +14 -0
- package/dist/esm/loaders/features/features.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/common/config/runtime.d.ts.map +1 -1
- package/dist/types/common/event-listener/event-listener-opts.d.ts +1 -1
- package/dist/types/common/harvest/connector.d.ts +6 -0
- package/dist/types/common/harvest/connector.d.ts.map +1 -0
- package/dist/types/common/harvest/harvester.d.ts.map +1 -1
- package/dist/types/common/harvest/send.d.ts.map +1 -1
- package/dist/types/common/unload/eol.d.ts +1 -1
- package/dist/types/common/unload/eol.d.ts.map +1 -1
- package/dist/types/common/util/console.d.ts +2 -1
- package/dist/types/common/util/console.d.ts.map +1 -1
- package/dist/types/common/v2/constants.d.ts +9 -0
- package/dist/types/common/v2/constants.d.ts.map +1 -0
- package/dist/types/common/v2/utils.d.ts +36 -11
- package/dist/types/common/v2/utils.d.ts.map +1 -1
- package/dist/types/common/wrap/wrap-events.d.ts +2 -1
- package/dist/types/common/wrap/wrap-events.d.ts.map +1 -1
- package/dist/types/common/wrap/wrap-history.d.ts +2 -1
- package/dist/types/common/wrap/wrap-history.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_event/aggregate_v2/index.d.ts +20 -0
- package/dist/types/features/page_view_event/aggregate_v2/index.d.ts.map +1 -0
- package/dist/types/features/page_view_event/instrument/index.d.ts.map +1 -1
- package/dist/types/features/page_view_timing/aggregate/index.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.map +1 -1
- package/dist/types/features/session_trace/instrument/index.d.ts.map +1 -1
- package/dist/types/features/utils/aggregate-base.d.ts +0 -5
- package/dist/types/features/utils/aggregate-base.d.ts.map +1 -1
- package/dist/types/features/utils/instrument-base.d.ts.map +1 -1
- package/dist/types/loaders/agent.d.ts.map +1 -1
- package/dist/types/loaders/api/register.d.ts.map +1 -1
- package/dist/types/loaders/configure/configure.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 +1 -1
- package/src/common/config/runtime.js +3 -0
- package/src/common/dom/selector-path.js +1 -1
- package/src/common/event-listener/event-listener-opts.js +1 -1
- package/src/common/harvest/connector.js +170 -0
- package/src/common/harvest/harvester.js +7 -9
- package/src/common/harvest/send.js +9 -7
- package/src/common/session/session-entity.js +1 -1
- package/src/common/timer/interaction-timer.js +2 -2
- package/src/common/unload/eol.js +3 -3
- package/src/common/util/console.js +2 -1
- package/src/common/util/feature-flags.js +1 -1
- package/src/common/v2/constants.js +15 -0
- package/src/common/v2/utils.js +23 -21
- package/src/common/window/page-visibility.js +1 -1
- package/src/common/wrap/wrap-events.js +4 -3
- package/src/common/wrap/wrap-fetch.js +2 -2
- package/src/common/wrap/wrap-function.js +1 -1
- package/src/common/wrap/wrap-history.js +3 -2
- package/src/common/wrap/wrap-xhr.js +2 -2
- package/src/features/ajax/aggregate/index.js +2 -2
- package/src/features/generic_events/aggregate/index.js +1 -1
- package/src/features/generic_events/instrument/index.js +1 -1
- package/src/features/jserrors/aggregate/index.js +6 -6
- package/src/features/logging/instrument/index.js +1 -1
- package/src/features/page_view_event/aggregate/index.js +2 -6
- package/src/features/page_view_event/aggregate_v2/index.js +97 -0
- package/src/features/page_view_event/instrument/index.js +6 -1
- package/src/features/page_view_timing/aggregate/index.js +5 -1
- package/src/features/session_replay/instrument/index.js +9 -0
- package/src/features/session_replay/shared/recorder.js +2 -1
- package/src/features/session_replay/shared/utils.js +3 -5
- package/src/features/session_trace/instrument/index.js +3 -3
- package/src/features/soft_navigations/instrument/index.js +2 -2
- package/src/features/utils/aggregate-base.js +0 -12
- package/src/features/utils/instrument-base.js +71 -25
- package/src/loaders/agent.js +2 -1
- package/src/loaders/api/consent.js +2 -2
- package/src/loaders/api/register.js +16 -6
- package/src/loaders/configure/configure.js +12 -0
- package/src/loaders/features/features.js +1 -0
- package/dist/cjs/common/url/location.js +0 -18
- package/dist/esm/common/url/location.js +0 -12
- package/dist/types/common/url/location.d.ts +0 -10
- package/dist/types/common/url/location.d.ts.map +0 -1
- package/src/common/url/__mocks__/location.js +0 -5
- package/src/common/url/location.js +0 -12
|
@@ -24,6 +24,7 @@ import { single } from '../../common/util/invoke';
|
|
|
24
24
|
import { SESSION_ERROR } from '../../common/constants/agent-constants';
|
|
25
25
|
import { handle } from '../../common/event-emitter/handle';
|
|
26
26
|
const checkedAgents = new WeakSet();
|
|
27
|
+
const runtimeBootstrapPromises = new WeakMap();
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* Base class for instrumenting a feature.
|
|
@@ -99,32 +100,14 @@ export class InstrumentBase extends FeatureBase {
|
|
|
99
100
|
this.loadedSuccessfully(false);
|
|
100
101
|
return;
|
|
101
102
|
}
|
|
102
|
-
let session;
|
|
103
103
|
try {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const {
|
|
107
|
-
setupAgentSession
|
|
108
|
-
} = await import(/* webpackChunkName: "session-manager" */'./agent-session');
|
|
109
|
-
session = setupAgentSession(agentRef);
|
|
110
|
-
}
|
|
104
|
+
// in the interest of keeping loader file size small, some modules are lazy-loaded as part of the larger async chunk
|
|
105
|
+
await ensureRuntimeBootstrap(agentRef, this.ee, this.featureName);
|
|
111
106
|
} catch (e) {
|
|
112
|
-
warn(
|
|
113
|
-
this.ee.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if (agentRef.init.api.register.allow_iframe_bridge) {
|
|
117
|
-
try {
|
|
118
|
-
// This chunk doesn't exist in the lite build (see webpack IgnorePlugin config) since none
|
|
119
|
-
// of lite's features wire up agent.register -- guard against that rather than letting an
|
|
120
|
-
// unhandled rejection surface if this flag is ever set on a lite page.
|
|
121
|
-
const {
|
|
122
|
-
setupIframeMFEMessageListener
|
|
123
|
-
} = await import(/* webpackChunkName: "iframe-message-handler" */'../../loaders/configure/iframe-message-handler');
|
|
124
|
-
setupIframeMFEMessageListener(agentRef);
|
|
125
|
-
} catch (e) {
|
|
126
|
-
warn(23, e);
|
|
127
|
-
}
|
|
107
|
+
warn(79, e);
|
|
108
|
+
this.ee.abort(); // failed Connector or Harvester will cause entire agent to shutdown
|
|
109
|
+
this.loadedSuccessfully(false);
|
|
110
|
+
return;
|
|
128
111
|
}
|
|
129
112
|
|
|
130
113
|
/**
|
|
@@ -132,7 +115,8 @@ export class InstrumentBase extends FeatureBase {
|
|
|
132
115
|
* it's only responsible for aborting its one specific feature, rather than all.
|
|
133
116
|
*/
|
|
134
117
|
try {
|
|
135
|
-
if (!this.#shouldImportAgg(this.featureName, session, agentRef.init)) {
|
|
118
|
+
if (!this.#shouldImportAgg(this.featureName, agentRef.runtime.session, agentRef.init)) {
|
|
119
|
+
this.abortHandler?.();
|
|
136
120
|
drain(this.agentRef, this.featureName);
|
|
137
121
|
this.loadedSuccessfully(false); // aggregate module isn't loaded at all
|
|
138
122
|
return;
|
|
@@ -141,15 +125,14 @@ export class InstrumentBase extends FeatureBase {
|
|
|
141
125
|
Aggregate
|
|
142
126
|
} = await fetchAggregator();
|
|
143
127
|
this.featAggregate = new Aggregate(agentRef, argsObjFromInstrument);
|
|
144
|
-
agentRef.runtime.harvester.initializedAggregates.push(this.featAggregate); // "subscribe" the feature to future harvest intervals
|
|
128
|
+
agentRef.runtime.harvester.initializedAggregates.push(this.featAggregate); // "subscribe" the feature to future harvest intervals
|
|
145
129
|
this.loadedSuccessfully(true);
|
|
146
130
|
} catch (e) {
|
|
147
131
|
warn(34, e);
|
|
148
|
-
this.abortHandler?.();
|
|
132
|
+
this.abortHandler?.();
|
|
149
133
|
// not supported yet but nice to do: "abort" this agent's EE for this feature specifically
|
|
150
134
|
drain(this.agentRef, this.featureName, true);
|
|
151
135
|
this.loadedSuccessfully(false);
|
|
152
|
-
if (this.ee) this.ee.abort();
|
|
153
136
|
}
|
|
154
137
|
};
|
|
155
138
|
|
|
@@ -208,4 +191,64 @@ export class InstrumentBase extends FeatureBase {
|
|
|
208
191
|
}, existingAgent.runtime.loaderType);
|
|
209
192
|
}
|
|
210
193
|
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Lazily initializes the shared runtime bootstrap for a given agent exactly once. This loads session setup, Connector, and
|
|
198
|
+
* Harvester through shared async chunks and returns the same in-flight Promise to any concurrent callers.
|
|
199
|
+
*
|
|
200
|
+
* Session setup failures are reported but do not stop bootstrap. Connector or Harvester failures are allowed to bubble so the caller can abort the agent.
|
|
201
|
+
*
|
|
202
|
+
* @param {Object} agentRef - The agent reference object.
|
|
203
|
+
* @param {Object} ee - The feature event emitter used for error reporting.
|
|
204
|
+
* @param {string} featureName - The feature name used when reporting session setup errors.
|
|
205
|
+
* @returns {Promise<void>} Resolves when the shared bootstrap completes.
|
|
206
|
+
*/
|
|
207
|
+
async function ensureRuntimeBootstrap(agentRef, ee, featureName) {
|
|
208
|
+
if (runtimeBootstrapPromises.has(agentRef)) return runtimeBootstrapPromises.get(agentRef);
|
|
209
|
+
const bootstrapPromise = (async () => {
|
|
210
|
+
if (canEnableSessionTracking(agentRef.init)) {
|
|
211
|
+
try {
|
|
212
|
+
const {
|
|
213
|
+
setupAgentSession
|
|
214
|
+
} = await import(/* webpackChunkName: "session-manager" */'./agent-session');
|
|
215
|
+
setupAgentSession(agentRef); // sets agentRef.runtime.session, if successful
|
|
216
|
+
} catch (e) {
|
|
217
|
+
warn(20, e);
|
|
218
|
+
ee.emit('internal-error', [e]);
|
|
219
|
+
handle(SESSION_ERROR, [e], undefined, featureName, ee);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
if (agentRef.init.api.register.allow_iframe_bridge) {
|
|
223
|
+
try {
|
|
224
|
+
// This chunk doesn't exist in the lite build (see webpack IgnorePlugin config) since none
|
|
225
|
+
// of lite's features wire up agent.register -- guard against that rather than letting an
|
|
226
|
+
// unhandled rejection surface if this flag is ever set on a lite page.
|
|
227
|
+
const {
|
|
228
|
+
setupIframeMFEMessageListener
|
|
229
|
+
} = await import(/* webpackChunkName: "iframe-message-handler" */'../../loaders/configure/iframe-message-handler');
|
|
230
|
+
setupIframeMFEMessageListener(agentRef);
|
|
231
|
+
} catch (e) {
|
|
232
|
+
warn(23, e);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
const [{
|
|
236
|
+
Connector
|
|
237
|
+
}, {
|
|
238
|
+
Harvester
|
|
239
|
+
}] = await Promise.all([import(/* webpackChunkName: "connector" */'../../common/harvest/connector'), import(/* webpackChunkName: "harvester" */'../../common/harvest/harvester')]);
|
|
240
|
+
agentRef.runtime.connector = new Connector(agentRef);
|
|
241
|
+
agentRef.runtime.harvester = new Harvester(agentRef);
|
|
242
|
+
|
|
243
|
+
/* Wait for auto-started features' aggregates to load before starting the harvest timer, so Harvester's EOL
|
|
244
|
+
listener registers after aggregate-level listeners like web-vitals' CWV APIs. Not awaited here to avoid
|
|
245
|
+
deadlock, since every feature awaits this same bootstrap promise before its own aggregate load.
|
|
246
|
+
Only auto-started features are waited on: an autoStart:false feature only registers in drainRegistry once
|
|
247
|
+
`start` is called, so filtering on that registry excludes any feature that's never started instead of
|
|
248
|
+
blocking startTimer() forever. */
|
|
249
|
+
const autoStartedFeatures = Object.values(agentRef.features).filter(feature => agentRef.runtime.drainRegistry.has(feature.featureName));
|
|
250
|
+
Promise.all(autoStartedFeatures.map(feature => feature.onAggregateImported)).then(() => agentRef.runtime.harvester.startTimer());
|
|
251
|
+
})();
|
|
252
|
+
runtimeBootstrapPromises.set(agentRef, bootstrapPromise);
|
|
253
|
+
await bootstrapPromise;
|
|
211
254
|
}
|
|
@@ -86,9 +86,10 @@ export class Agent extends AgentBase {
|
|
|
86
86
|
try {
|
|
87
87
|
const enabledFeatures = getEnabledFeatures(this.init);
|
|
88
88
|
const featuresToStart = [...this.desiredFeatures];
|
|
89
|
+
const isRumV2Enabled = this.init.feature_flags.includes('rum_v2');
|
|
89
90
|
featuresToStart.sort((a, b) => featurePriority[a.featureName] - featurePriority[b.featureName]);
|
|
90
91
|
featuresToStart.forEach(InstrumentCtor => {
|
|
91
|
-
if (!enabledFeatures[InstrumentCtor.featureName] && InstrumentCtor.featureName !== FEATURE_NAMES.pageViewEvent) return; // PVE is required to run even if it's marked disabled
|
|
92
|
+
if (!enabledFeatures[InstrumentCtor.featureName] && (isRumV2Enabled || InstrumentCtor.featureName !== FEATURE_NAMES.pageViewEvent)) return; // PVE is required to run even if it's marked disabled unless rum_v2 is enabled
|
|
92
93
|
|
|
93
94
|
const dependencies = getFeatureDependencyNames(InstrumentCtor.featureName);
|
|
94
95
|
const missingDependencies = dependencies.filter(featName => !(featName in this.features)); // any other feature(s) this depends on should've been initialized on prior iterations by priority order
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2020-
|
|
2
|
+
* Copyright 2020-2026 New Relic, Inc. All rights reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { prefix, CONSENT } from './constants';
|
|
@@ -22,7 +22,7 @@ export function setupConsentAPI(agent) {
|
|
|
22
22
|
pveInst.onAggregateImported.then(loaded => {
|
|
23
23
|
const pveAgg = pveInst.featAggregate;
|
|
24
24
|
if (loaded && !pveAgg.sentRum) {
|
|
25
|
-
pveAgg.sendRum();
|
|
25
|
+
pveAgg.sendRum?.(); // only the old v1 aggregate has a sendRum method that acts as a blocker for the rest of the agent; v2 aggregate will auto report when harvester becomes unblocked
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { handle } from '../../common/event-emitter/handle';
|
|
6
6
|
import { warn } from '../../common/util/console';
|
|
7
|
-
import { V2_TYPES } from '../../common/v2/
|
|
7
|
+
import { V2_TYPES } from '../../common/v2/constants';
|
|
8
8
|
import { FEATURE_NAMES } from '../features/features';
|
|
9
9
|
import { now } from '../../common/timing/now';
|
|
10
10
|
import { SUPPORTABILITY_METRIC_CHANNEL } from '../../features/metrics/constants';
|
|
@@ -20,6 +20,7 @@ import { subscribeToPageUnload } from '../../common/window/page-visibility';
|
|
|
20
20
|
import { findScriptTimings } from '../../common/v2/script-tracker';
|
|
21
21
|
import { trackMFEVitals } from '../../common/v2/mfe-vitals';
|
|
22
22
|
import { generateRandomHexString } from '../../common/ids/unique-id';
|
|
23
|
+
import { cleanURL } from '../../common/url/clean-url';
|
|
23
24
|
|
|
24
25
|
/**
|
|
25
26
|
* @typedef {import('./register-api-types').RegisterAPI} RegisterAPI
|
|
@@ -77,10 +78,15 @@ function register(agentRef, target) {
|
|
|
77
78
|
// getter because this is asynchronously set
|
|
78
79
|
type: V2_TYPES.BA
|
|
79
80
|
};
|
|
81
|
+
|
|
82
|
+
// The script timings for this entity, which will be used to populate part of the MicroFrontEndTiming custom event.
|
|
80
83
|
const timings = findScriptTimings(target);
|
|
81
84
|
|
|
82
|
-
// Track MFE vitals for this entity
|
|
85
|
+
// Track MFE vitals for this entity, which will be used to populate part of the MicroFrontEndTiming custom event.
|
|
83
86
|
const vitals = trackMFEVitals(target, timings);
|
|
87
|
+
|
|
88
|
+
// the URL of the page at the time this entity was registered, which will be used to populate part of the MicroFrontEndTiming custom event.
|
|
89
|
+
const registerUrl = cleanURL('' + location);
|
|
84
90
|
const attrs = {};
|
|
85
91
|
|
|
86
92
|
// Only define attributes getter if it doesn't already exist
|
|
@@ -216,6 +222,13 @@ function register(agentRef, target) {
|
|
|
216
222
|
// the url of the script that was registered, or undefined if it could not be determined (inline or no match)
|
|
217
223
|
assetType: timings.type,
|
|
218
224
|
// the type of asset that was associated with the timings, one of 'script', 'link' (if preloaded and found in the resource timing buffer), 'preload' (if preloaded but not found in the resource timing buffer), or "unknown" if it could not be determined
|
|
225
|
+
registerUrl,
|
|
226
|
+
// the url of the page at the time this entity was registered
|
|
227
|
+
deregisterUrl: cleanURL('' + location),
|
|
228
|
+
// the url of the page at the time this entity was deregistered (or unloaded)
|
|
229
|
+
// generic_events' addEvent() injects pageUrl/currentUrl on every custom event by default; override them away here in favor of registerUrl/deregisterUrl above
|
|
230
|
+
pageUrl: undefined,
|
|
231
|
+
currentUrl: undefined,
|
|
219
232
|
timeAlive: timings.reportedAt - timings.registeredAt,
|
|
220
233
|
// registeredAt to reportedAt
|
|
221
234
|
timeToBeRequested: timings.fetchStart,
|
|
@@ -230,19 +243,19 @@ function register(agentRef, target) {
|
|
|
230
243
|
// timestamp when register() was called
|
|
231
244
|
// leave room to extend these with more data keys as needed
|
|
232
245
|
...(vitals.fcp.value >= 0 && {
|
|
233
|
-
'
|
|
246
|
+
'vitals.fcp.value': vitals.fcp.value
|
|
234
247
|
}),
|
|
235
248
|
// FCP vital object with value and metadata
|
|
236
249
|
...(vitals.lcp.value >= 0 && {
|
|
237
|
-
'
|
|
250
|
+
'vitals.lcp.value': vitals.lcp.value
|
|
238
251
|
}),
|
|
239
252
|
// LCP vital object with value and metadata
|
|
240
253
|
...(vitals.cls.value >= 0 && {
|
|
241
|
-
'
|
|
254
|
+
'vitals.cls.value': vitals.cls.value
|
|
242
255
|
}),
|
|
243
256
|
// CLS vital object with value and metadata
|
|
244
257
|
...(vitals.inp.value >= 0 && {
|
|
245
|
-
'
|
|
258
|
+
'vitals.inp.value': vitals.inp.value
|
|
246
259
|
}) // INP vital object with value and metadata
|
|
247
260
|
};
|
|
248
261
|
api.recordCustomEvent('MicroFrontEndTiming', eventData);
|
|
@@ -7,6 +7,7 @@ import { gosCDN } from '../../common/window/nreum';
|
|
|
7
7
|
import { mergeInfo } from '../../common/config/info';
|
|
8
8
|
import { mergeInit } from '../../common/config/init';
|
|
9
9
|
import { mergeRuntime } from '../../common/config/runtime';
|
|
10
|
+
import { V2_TYPES } from '../../common/v2/constants';
|
|
10
11
|
import { isWorkerScope, globalScope } from '../../common/constants/runtime';
|
|
11
12
|
import { redefinePublicPath } from './public-path';
|
|
12
13
|
import { ee } from '../../common/event-emitter/contextual-ee';
|
|
@@ -46,6 +47,19 @@ export function configure(agent, opts = {}, loaderType, forceDrain) {
|
|
|
46
47
|
agent.info = mergeInfo(info);
|
|
47
48
|
const updatedInit = agent.init;
|
|
48
49
|
agent.runtime ??= mergeRuntime(runtime);
|
|
50
|
+
agent.runtime.v2Target ??= {
|
|
51
|
+
type: V2_TYPES.BA,
|
|
52
|
+
instance: agent.agentIdentifier,
|
|
53
|
+
get id() {
|
|
54
|
+
return agent.runtime.appMetadata?.agents?.[0]?.entityGuid;
|
|
55
|
+
},
|
|
56
|
+
get attributes() {
|
|
57
|
+
return {
|
|
58
|
+
'entity.guid': this.id,
|
|
59
|
+
appId: agent.info.applicationID
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
};
|
|
49
63
|
|
|
50
64
|
// Apply proxy settings whenever configure is called (supports late {init} setting)
|
|
51
65
|
if (updatedInit.proxy.assets) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.js","../src/cdn/experimental.js","../src/cdn/lite.js","../src/cdn/pro.js","../src/cdn/spa.js","../src/common/aggregate/aggregator.js","../src/common/aggregate/event-aggregator.js","../src/common/config/configurable.js","../src/common/config/info.js","../src/common/config/init-types.js","../src/common/config/init.js","../src/common/config/loader-config.js","../src/common/config/runtime.js","../src/common/constants/agent-constants.js","../src/common/constants/env.cdn.js","../src/common/constants/env.js","../src/common/constants/env.npm.js","../src/common/constants/events.js","../src/common/constants/iframe-constants.js","../src/common/constants/runtime.js","../src/common/constants/shared-channel.js","../src/common/deny-list/deny-list.js","../src/common/dispatch/global-event.js","../src/common/dom/iframe.js","../src/common/dom/query-selector.js","../src/common/dom/selector-path.js","../src/common/drain/drain.js","../src/common/event-emitter/contextual-ee.js","../src/common/event-emitter/event-context.js","../src/common/event-emitter/handle.js","../src/common/event-emitter/register-handler.js","../src/common/event-listener/event-listener-opts.js","../src/common/harvest/harvester.js","../src/common/harvest/send.js","../src/common/harvest/types.js","../src/common/ids/bundle-id.js","../src/common/ids/id.js","../src/common/ids/unique-id.js","../src/common/payloads/payloads.js","../src/common/serialize/bel-serializer.js","../src/common/session/constants.js","../src/common/session/session-entity.js","../src/common/session/session-key.js","../src/common/storage/local-storage.js","../src/common/timer/interaction-timer.js","../src/common/timer/timer.js","../src/common/timing/nav-timing.js","../src/common/timing/now.js","../src/common/timing/time-keeper.js","../src/common/unload/eol.js","../src/common/url/add-url.js","../src/common/url/canonicalize-url.js","../src/common/url/clean-url.js","../src/common/url/encode.js","../src/common/url/extract-url.js","../src/common/url/
|
|
1
|
+
{"root":["../src/index.js","../src/cdn/experimental.js","../src/cdn/lite.js","../src/cdn/pro.js","../src/cdn/spa.js","../src/common/aggregate/aggregator.js","../src/common/aggregate/event-aggregator.js","../src/common/config/configurable.js","../src/common/config/info.js","../src/common/config/init-types.js","../src/common/config/init.js","../src/common/config/loader-config.js","../src/common/config/runtime.js","../src/common/constants/agent-constants.js","../src/common/constants/env.cdn.js","../src/common/constants/env.js","../src/common/constants/env.npm.js","../src/common/constants/events.js","../src/common/constants/iframe-constants.js","../src/common/constants/runtime.js","../src/common/constants/shared-channel.js","../src/common/deny-list/deny-list.js","../src/common/dispatch/global-event.js","../src/common/dom/iframe.js","../src/common/dom/query-selector.js","../src/common/dom/selector-path.js","../src/common/drain/drain.js","../src/common/event-emitter/contextual-ee.js","../src/common/event-emitter/event-context.js","../src/common/event-emitter/handle.js","../src/common/event-emitter/register-handler.js","../src/common/event-listener/event-listener-opts.js","../src/common/harvest/connector.js","../src/common/harvest/harvester.js","../src/common/harvest/send.js","../src/common/harvest/types.js","../src/common/ids/bundle-id.js","../src/common/ids/id.js","../src/common/ids/unique-id.js","../src/common/payloads/payloads.js","../src/common/serialize/bel-serializer.js","../src/common/session/constants.js","../src/common/session/session-entity.js","../src/common/session/session-key.js","../src/common/storage/local-storage.js","../src/common/timer/interaction-timer.js","../src/common/timer/timer.js","../src/common/timing/nav-timing.js","../src/common/timing/now.js","../src/common/timing/time-keeper.js","../src/common/unload/eol.js","../src/common/url/add-url.js","../src/common/url/canonicalize-url.js","../src/common/url/clean-url.js","../src/common/url/encode.js","../src/common/url/extract-url.js","../src/common/url/parse-url.js","../src/common/url/protocol.js","../src/common/util/attribute-size.js","../src/common/util/browser-stack-matchers.js","../src/common/util/console.js","../src/common/util/data-size.js","../src/common/util/event-origin.js","../src/common/util/feature-flags.js","../src/common/util/get-or-set.js","../src/common/util/invoke.js","../src/common/util/monkey-patched.js","../src/common/util/obfuscate.js","../src/common/util/short-circuit.js","../src/common/util/stringify.js","../src/common/util/submit-data.js","../src/common/util/text.js","../src/common/util/traverse.js","../src/common/util/type-check.js","../src/common/util/webdriver-detection.js","../src/common/v2/constants.js","../src/common/v2/mfe-vitals.js","../src/common/v2/script-correlation.js","../src/common/v2/script-tracker-constants.js","../src/common/v2/script-tracker.js","../src/common/v2/timing-factory.js","../src/common/v2/utils.js","../src/common/vitals/constants.js","../src/common/vitals/cumulative-layout-shift.js","../src/common/vitals/first-contentful-paint.js","../src/common/vitals/first-paint.js","../src/common/vitals/interaction-to-next-paint.js","../src/common/vitals/largest-contentful-paint.js","../src/common/vitals/load-time.js","../src/common/vitals/time-to-first-byte.js","../src/common/vitals/vital-metric.js","../src/common/window/load.js","../src/common/window/nreum.js","../src/common/window/page-visibility.js","../src/common/wrap/wrap-events.js","../src/common/wrap/wrap-fetch.js","../src/common/wrap/wrap-function.js","../src/common/wrap/wrap-history.js","../src/common/wrap/wrap-logger.js","../src/common/wrap/wrap-websocket.js","../src/common/wrap/wrap-xhr.js","../src/features/ajax/constants.js","../src/features/ajax/index.js","../src/features/ajax/aggregate/gql.js","../src/features/ajax/aggregate/index.js","../src/features/ajax/instrument/distributed-tracing.js","../src/features/ajax/instrument/index.js","../src/features/ajax/instrument/response-size.js","../src/features/generic_events/constants.js","../src/features/generic_events/index.js","../src/features/generic_events/aggregate/index.js","../src/features/generic_events/aggregate/user-actions/aggregated-user-action.js","../src/features/generic_events/aggregate/user-actions/user-actions-aggregator.js","../src/features/generic_events/instrument/index.js","../src/features/jserrors/constants.js","../src/features/jserrors/index.js","../src/features/jserrors/aggregate/canonical-function-name.js","../src/features/jserrors/aggregate/cause-string.js","../src/features/jserrors/aggregate/compute-stack-trace.js","../src/features/jserrors/aggregate/format-stack-trace.js","../src/features/jserrors/aggregate/index.js","../src/features/jserrors/aggregate/internal-errors.js","../src/features/jserrors/aggregate/string-hash-code.js","../src/features/jserrors/instrument/index.js","../src/features/jserrors/shared/cast-error.js","../src/features/jserrors/shared/uncaught-error.js","../src/features/logging/constants.js","../src/features/logging/index.js","../src/features/logging/aggregate/index.js","../src/features/logging/instrument/index.js","../src/features/logging/shared/log.js","../src/features/logging/shared/utils.js","../src/features/metrics/constants.js","../src/features/metrics/index.js","../src/features/metrics/aggregate/framework-detection.js","../src/features/metrics/aggregate/harvest-metadata.js","../src/features/metrics/aggregate/index.js","../src/features/metrics/instrument/index.js","../src/features/page_action/constants.js","../src/features/page_action/index.js","../src/features/page_action/instrument/index.js","../src/features/page_view_event/constants.js","../src/features/page_view_event/index.js","../src/features/page_view_event/aggregate/index.js","../src/features/page_view_event/aggregate/initialized-features.js","../src/features/page_view_event/aggregate_v2/index.js","../src/features/page_view_event/instrument/index.js","../src/features/page_view_timing/constants.js","../src/features/page_view_timing/index.js","../src/features/page_view_timing/aggregate/index.js","../src/features/page_view_timing/instrument/index.js","../src/features/session_replay/constants.js","../src/features/session_replay/index.js","../src/features/session_replay/aggregate/index.js","../src/features/session_replay/instrument/index.js","../src/features/session_replay/shared/recorder-events.js","../src/features/session_replay/shared/recorder.js","../src/features/session_replay/shared/stylesheet-evaluator.js","../src/features/session_replay/shared/utils.js","../src/features/session_trace/constants.js","../src/features/session_trace/index.js","../src/features/session_trace/aggregate/index.js","../src/features/session_trace/aggregate/trace/node.js","../src/features/session_trace/aggregate/trace/storage.js","../src/features/session_trace/aggregate/trace/utils.js","../src/features/session_trace/instrument/index.js","../src/features/soft_navigations/constants.js","../src/features/soft_navigations/index.js","../src/features/soft_navigations/aggregate/ajax-node.js","../src/features/soft_navigations/aggregate/bel-node.js","../src/features/soft_navigations/aggregate/index.js","../src/features/soft_navigations/aggregate/initial-page-load-interaction.js","../src/features/soft_navigations/aggregate/interaction.js","../src/features/soft_navigations/instrument/index.js","../src/features/utils/agent-session.js","../src/features/utils/aggregate-base.js","../src/features/utils/event-buffer.js","../src/features/utils/feature-base.js","../src/features/utils/feature-gates.js","../src/features/utils/instrument-base.js","../src/interfaces/registered-entity.js","../src/interfaces/registered-iframe-entity.js","../src/loaders/agent-base.js","../src/loaders/agent.js","../src/loaders/api-base.js","../src/loaders/browser-agent.js","../src/loaders/micro-agent-base.js","../src/loaders/micro-agent.js","../src/loaders/api/addPageAction.js","../src/loaders/api/addRelease.js","../src/loaders/api/addToTrace.js","../src/loaders/api/consent.js","../src/loaders/api/constants.js","../src/loaders/api/finished.js","../src/loaders/api/interaction-types.js","../src/loaders/api/interaction.js","../src/loaders/api/log.js","../src/loaders/api/measure.js","../src/loaders/api/noticeError.js","../src/loaders/api/pauseReplay.js","../src/loaders/api/recordCustomEvent.js","../src/loaders/api/recordReplay.js","../src/loaders/api/register-api-types.js","../src/loaders/api/register.js","../src/loaders/api/setApplicationVersion.js","../src/loaders/api/setCustomAttribute.js","../src/loaders/api/setErrorHandler.js","../src/loaders/api/setPageViewName.js","../src/loaders/api/setUserId.js","../src/loaders/api/sharedHandlers.js","../src/loaders/api/start.js","../src/loaders/api/topLevelCallers.js","../src/loaders/api/wrapLogger.js","../src/loaders/configure/configure.js","../src/loaders/configure/iframe-message-handler.js","../src/loaders/configure/nonce.js","../src/loaders/configure/public-path.js","../src/loaders/features/enabled-features.js","../src/loaders/features/featureDependencies.js","../src/loaders/features/features.js"],"version":"5.9.3"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/common/config/runtime.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/common/config/runtime.js"],"names":[],"mappings":"AAgEO,gDAON"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/connector.js"],"names":[],"mappings":"AAmBA;IAKE,2BAeC;IAED,+CAiBC;;CA+GF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harvester.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/harvester.js"],"names":[],"mappings":"AAiBA;IAIE,
|
|
1
|
+
{"version":3,"file":"harvester.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/harvester.js"],"names":[],"mappings":"AAiBA;IAIE,2BAKC;IAPD,6BAA0B;IAGxB,cAAwB;IAGxB,uBAA0C;IAG5C,wCAgBC;IAED;;;;;OAKG;IACH,iCAJW,MAAM,cACN,MAAM,GACJ,OAAO,CA+CnB;;CACF;2BAxF0B,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/send.js"],"names":[],"mappings":"AAuBA;;;;;GAKG;AACH,+BAJW,MAAM,sHACN,eAAe,GACb,OAAO,
|
|
1
|
+
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/send.js"],"names":[],"mappings":"AAuBA;;;;;GAKG;AACH,+BAJW,MAAM,sHACN,eAAe,GACb,OAAO,CAyHnB;8BAlIY,OAAO,YAAY,EAAE,eAAe"}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* This is used, for example, to submit a final harvest and send all remaining data on best-effort.
|
|
4
4
|
* @param {function} cb - func to run before or during the last reliable event or time of an env's life span
|
|
5
5
|
*/
|
|
6
|
-
export function subscribeToEOL(cb: Function
|
|
6
|
+
export function subscribeToEOL(cb: Function): void;
|
|
7
7
|
//# sourceMappingURL=eol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eol.d.ts","sourceRoot":"","sources":["../../../../src/common/unload/eol.js"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"eol.d.ts","sourceRoot":"","sources":["../../../../src/common/unload/eol.js"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,mDAOC"}
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
* | 50 | Failed to connect. Cannot allow registered API. |
|
|
59
59
|
* | 51 | Container agent is not available to register with. Can not connect. |
|
|
60
60
|
* | 52 | Unexpected problem encountered. There should be at least one app for harvest! |
|
|
61
|
-
* | 53 |
|
|
61
|
+
* | 53 | Failed to parse connect response. |
|
|
62
62
|
* | 54 | An experimental feature is being used. Support can not be offered for issues. |
|
|
63
63
|
* | 55 | Register API has been disabled on the container agent. |
|
|
64
64
|
* | 56 | Could not find a matching entity to store data. |
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
* | 76 | Agent rejected post message, could not match with existing entity. |
|
|
85
85
|
* | 77 | Agent rejected post message, could not validate origin. |
|
|
86
86
|
* | 78 | RegisteredIframeEntity could not determine parent origin and will not register, to avoid trusting messages from any origin. |
|
|
87
|
+
* | 79 | Unable to initialize Connector and/or Harvester. |
|
|
87
88
|
*
|
|
88
89
|
* @param {number} code The warning code to emit, which will be used to link to the warning code documentation
|
|
89
90
|
* @param {*} [secondary] Secondary data to include, usually an extra message, error or object
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../../../src/common/util/console.js"],"names":[],"mappings":"AAUA
|
|
1
|
+
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../../../src/common/util/console.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AAEH,2BALW,MAAM,cACN,GAAC,QAiBX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/common/v2/constants.js"],"names":[],"mappings":";;;uBAMU,MAAM"}
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} V2Target
|
|
3
|
+
* @property {'BA'} type always V2_TYPES.BA -- identifies this as the container (main) agent, not a registered MFE
|
|
4
|
+
* @property {string} instance the container agent's agentIdentifier
|
|
5
|
+
* @property {string} [id] the container agent's entity guid, once known (getter, resolved asynchronously)
|
|
6
|
+
* @property {{[key:string]: any}} attributes the V2 payload attributes for the container agent (getter)
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Determines if a given target represents a registered MFE (as opposed to the container agent).
|
|
10
|
+
* @param {*} target the target to check
|
|
11
|
+
* @returns {boolean} true if the target is a registered MFE target
|
|
12
|
+
*/
|
|
13
|
+
export function isMfeTarget(target: any): boolean;
|
|
1
14
|
/**
|
|
2
15
|
* Returns a single registered entity associated with a given iframe interface ID. Returns undefined if no entity is found.
|
|
3
16
|
* @param {string} iframeInterfaceId
|
|
@@ -69,24 +82,36 @@ export function shouldDuplicate(target: import("../../interfaces/registered-enti
|
|
|
69
82
|
/**
|
|
70
83
|
* Finds the registered targets from the stack trace for a given agent reference.
|
|
71
84
|
* @param {*} agentRef The agent reference to use for finding targets.
|
|
72
|
-
* @returns {Array} An array of targets found from the stack trace. If no targets are found or allowed, returns an array
|
|
85
|
+
* @returns {Array} An array of targets found from the stack trace. If no targets are found or allowed, returns an array containing the container target.
|
|
73
86
|
*/
|
|
74
87
|
export function findTargetsFromStackTrace(agentRef: any): any[];
|
|
75
88
|
/**
|
|
76
89
|
* Removes duplicate targets from an array, keyed by `target.instance`. This guards against the same canonical
|
|
77
90
|
* target re-entering the array via multiple matched stack-frame URLs (e.g. a recursive call whose stack contains the
|
|
78
|
-
* same file at multiple depths).
|
|
79
|
-
* naturally collapse to a single entry too, which is the desired behavior.
|
|
91
|
+
* same file at multiple depths). Multiple container-target entries (whose `instance` is the container agent's stable
|
|
92
|
+
* `agentIdentifier`) naturally collapse to a single entry too, which is the desired behavior.
|
|
80
93
|
* @param {Array} targets
|
|
81
94
|
* @returns {Array} deduped list of targets, preserving relative order of first occurrence
|
|
82
95
|
*/
|
|
83
96
|
export function dedupeTargetsByInstance(targets: any[]): any[];
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
97
|
+
export type V2Target = {
|
|
98
|
+
/**
|
|
99
|
+
* always V2_TYPES.BA -- identifies this as the container (main) agent, not a registered MFE
|
|
100
|
+
*/
|
|
101
|
+
type: "BA";
|
|
102
|
+
/**
|
|
103
|
+
* the container agent's agentIdentifier
|
|
104
|
+
*/
|
|
105
|
+
instance: string;
|
|
106
|
+
/**
|
|
107
|
+
* the container agent's entity guid, once known (getter, resolved asynchronously)
|
|
108
|
+
*/
|
|
109
|
+
id?: string | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* the V2 payload attributes for the container agent (getter)
|
|
112
|
+
*/
|
|
113
|
+
attributes: {
|
|
114
|
+
[key: string]: any;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
92
117
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/common/v2/utils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/common/v2/utils.js"],"names":[],"mappings":"AAQA;;;;;;GAMG;AAEH;;;;GAIG;AACH,oCAHW,GAAC,GACC,OAAO,CAInB;AAED;;;;;GAKG;AACH,0EAJW,MAAM,YACN,GAAC,GACC,OAAO,sCAAsC,EAAE,WAAW,GAAC,SAAS,CAMhF;AAED;;;;;GAKG;AACH,+CAJW,MAAM,GAAC,MAAM,YACb,GAAC,GACC,OAAO,oCAAoC,EAAE,yBAAyB,EAAE,CAMpF;AAED;;;;;;;;;;;;GAYG;AACH,2DAJW,MAAM,YACN,GAAC,GACC,OAAO,oCAAoC,EAAE,yBAAyB,EAAE,CAOpF;AAED;;;;;;;;;;;;GAYG;AACH,wEA6BC;AAED;;;;;;;GAOG;AACH,+CAJW,MAAM,sBACN,iBAAiB,GACf,MAAM,CAQlB;AAED;;;;;;;GAOG;AACH,yDAJW,OAAO,oCAAoC,EAAE,yBAAyB,qBACtE,GAAC,GACC,MAAM,CAKlB;AAED;;;;;;GAMG;AACH,wCAJW,OAAO,oCAAoC,EAAE,yBAAyB,qBACtE,GAAC,GACC,OAAO,CAInB;AAED;;;;GAIG;AACH,oDAHW,GAAC,SAqBX;AAED;;;;;;;GAOG;AACH,+DAUC;;;;;UA1La,IAAI;;;;cACJ,MAAM;;;;;;;;gBAEN;QAAC,CAAC,GAAG,EAAC,MAAM,GAAG,GAAG,CAAA;KAAC"}
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
* `document` (if in a browser scope). Adds custom events in context of a new emitter scoped only to these methods.
|
|
4
4
|
* @param {Object} sharedEE - The shared event emitter on which a new scoped
|
|
5
5
|
* event emitter will be based.
|
|
6
|
+
* @param {*} [agentRef] - The agent reference, used to attribute wrapped calls to the correct v2 target.
|
|
6
7
|
* @returns {Object} Scoped event emitter with a debug ID of `events`.
|
|
7
8
|
*/
|
|
8
|
-
export function wrapEvents(sharedEE: Object): Object;
|
|
9
|
+
export function wrapEvents(sharedEE: Object, agentRef?: any): Object;
|
|
9
10
|
/**
|
|
10
11
|
* Returns an event emitter scoped specifically for the `events` context. This scoping is a remnant from when all the
|
|
11
12
|
* features shared the same group in the event, to isolate events between features. It will likely be revisited.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrap-events.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-events.js"],"names":[],"mappings":"AAqBA
|
|
1
|
+
{"version":3,"file":"wrap-events.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-events.js"],"names":[],"mappings":"AAqBA;;;;;;;GAOG;AACH,qCALW,MAAM,aAEN,GAAC,GACC,MAAM,CA0DlB;AAeD;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* Wraps the `pushState` and `replaceState` methods of `window.history` and returns a corresponding event emitter
|
|
3
3
|
* scoped to the history object.
|
|
4
4
|
* @param {Object} sharedEE - The shared event emitter on which a new scoped event emitter will be based.
|
|
5
|
+
* @param {*} [agentRef] - The agent reference, used to attribute wrapped calls to the correct v2 target.
|
|
5
6
|
* @returns {Object} Scoped event emitter with a debug ID of `history`.
|
|
6
7
|
*/
|
|
7
|
-
export function wrapHistory(sharedEE: Object): Object;
|
|
8
|
+
export function wrapHistory(sharedEE: Object, agentRef?: any): Object;
|
|
8
9
|
/**
|
|
9
10
|
* Returns an event emitter scoped specifically for the `history` context. This scoping is a remnant from when all the
|
|
10
11
|
* features shared the same group in the event, to isolate events between features. It will likely be revisited.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrap-history.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-history.js"],"names":[],"mappings":"AAgBA
|
|
1
|
+
{"version":3,"file":"wrap-history.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-history.js"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AACH,sCAJW,MAAM,aACN,GAAC,GACC,MAAM,CAoBlB;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,GAEJ,MAAM,CAIlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_event/aggregate/index.js"],"names":[],"mappings":"AAyBA;IACE,2BAA2C;IAE3C,2BAuCC;IApCC,kCAAqG;IACrG,iBAAoB;IAEpB,wBAAwB;IACxB,8BAA8B;IAC9B,8BAA8B;IAC9B,gBAAgB;IAGhB,uBAA2D;IA6B7D;;;;OAIG;IACH,2BAFW,GAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_event/aggregate/index.js"],"names":[],"mappings":"AAyBA;IACE,2BAA2C;IAE3C,2BAuCC;IApCC,kCAAqG;IACrG,iBAAoB;IAEpB,wBAAwB;IACxB,8BAA8B;IAC9B,8BAA8B;IAC9B,gBAAgB;IAGhB,uBAA2D;IA6B7D;;;;OAIG;IACH,2BAFW,GAAC,QA+DX;IAXC;;;;;;;;;;;;;;mBAOC;IANC,iCAAyB;IAY7B,kCAEC;IAED;;;;;;aA2GC;CACF;8BA9O6B,4BAA4B;2BAQ/B,gCAAgC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export class Aggregate extends AggregateBase {
|
|
2
|
+
static featureName: string;
|
|
3
|
+
constructor(agentRef: any);
|
|
4
|
+
queryStringsBuilder(): {
|
|
5
|
+
fp: any;
|
|
6
|
+
fcp: any;
|
|
7
|
+
qt: any;
|
|
8
|
+
ap: any;
|
|
9
|
+
be: number;
|
|
10
|
+
fe: number;
|
|
11
|
+
dc: number;
|
|
12
|
+
at: any;
|
|
13
|
+
af: string;
|
|
14
|
+
igp: any;
|
|
15
|
+
};
|
|
16
|
+
serializer(eventBuffer: any): any;
|
|
17
|
+
#private;
|
|
18
|
+
}
|
|
19
|
+
import { AggregateBase } from '../../utils/aggregate-base';
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_event/aggregate_v2/index.js"],"names":[],"mappings":"AAiBA;IACE,2BAA2C;IAO3C,2BAkBC;IAED;;;;;;;;;;;MA0CC;IAMD,kCAEC;;CACF;8BAvF6B,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_event/instrument/index.js"],"names":[],"mappings":"AAWA;IACE,2BAA2C;IAC3C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_event/instrument/index.js"],"names":[],"mappings":"AAWA;IACE,2BAA2C;IAC3C,2BAeC;IAED,8BA+BC;CACF;AAED,8CAAuC;+BA3DR,6BAA6B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_timing/aggregate/index.js"],"names":[],"mappings":"AA2BA;IACE,2BAAiC;IAMjC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/page_view_timing/aggregate/index.js"],"names":[],"mappings":"AA2BA;IACE,2BAAiC;IAMjC,2BAmCC;IAjCC,4BAA+B;IAC/B,0BAA6B;IAK7B,uBAA2D;IA6B7D;;;OAGG;IACH,6BAFW,MAAM,QAOhB;IAED;;;;MAiCC;IAED;;;OAGG;IACH,4BAFa,IAAI,CAahB;IAWD,4BAGC;IAGD,qCA8BC;;CACF;8BA1K6B,4BAA4B;2BAC/B,gCAAgC"}
|
|
@@ -3,6 +3,7 @@ export class Instrument extends InstrumentBase {
|
|
|
3
3
|
constructor(agentRef: any);
|
|
4
4
|
/** The RRWEB recorder instance, if imported */
|
|
5
5
|
recorder: any;
|
|
6
|
+
abortHandler: () => void;
|
|
6
7
|
errorNoticed: boolean;
|
|
7
8
|
/**
|
|
8
9
|
* Returns a promise that imports the recorder module. Only lets the recorder module be imported and instantiated once. Rejects if failed to import/instantiate.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/instrument/index.js"],"names":[],"mappings":"AAkBA;IACE,2BAAiC;IAMjC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/instrument/index.js"],"names":[],"mappings":"AAkBA;IACE,2BAAiC;IAMjC,2BAqCC;IAxCD,+CAA+C;IAC/C,cAAQ;IA2BN,yBAA+B;IAQ3B,sBAAwB;IAmB9B;;;OAGG;IACH,+BAkBC;;CAqBF;AAED,8CAAuC;+BA/GR,6BAA6B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/shared/recorder.js"],"names":[],"mappings":"AAqBA;IAUE,+BAoCC;IAtCD,sBAAmB;IAGjB,iDAAiD;IACjD,kBAAgC;IAEhC,QAAyB;IACzB,mBAA6C;IAC7C,cAAqC;IAErC,qBAAwB;IACxB,0FAA0F;IAC1F,eAAkE;IAElE,iHAAiH;IACjH,uBAAgD;IAChD,mFAAmF;IACnF,iCAA0D;IAC1D,+DAA+D;IAC/D,kBAA6B;IAC7B,uIAAuI;IACvI,yBAA4B;IAC5B,qBAAwB;IACxB,kIAAkI;IAClI,kBAAqB;IACrB,uIAAuI;IACvI,0BAAwE;IAc1E,mBAEC;IAED;;;;;;;;;MAWC;IAED,kFAAkF;IAClF,oBAGC;IAED,qDAAqD;IACrD,8CA0CC;IAED;;;;;OAKG;IACH,aAHW,GAAC,cACD,GAAC,QAiCX;IAED,yHAAyH;IACzH,
|
|
1
|
+
{"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/shared/recorder.js"],"names":[],"mappings":"AAqBA;IAUE,+BAoCC;IAtCD,sBAAmB;IAGjB,iDAAiD;IACjD,kBAAgC;IAEhC,QAAyB;IACzB,mBAA6C;IAC7C,cAAqC;IAErC,qBAAwB;IACxB,0FAA0F;IAC1F,eAAkE;IAElE,iHAAiH;IACjH,uBAAgD;IAChD,mFAAmF;IACnF,iCAA0D;IAC1D,+DAA+D;IAC/D,kBAA6B;IAC7B,uIAAuI;IACvI,yBAA4B;IAC5B,qBAAwB;IACxB,kIAAkI;IAClI,kBAAqB;IACrB,uIAAuI;IACvI,0BAAwE;IAc1E,mBAEC;IAED;;;;;;;;;MAWC;IAED,kFAAkF;IAClF,oBAGC;IAED,qDAAqD;IACrD,8CA0CC;IAED;;;;;OAKG;IACH,aAHW,GAAC,cACD,GAAC,QAiCX;IAED,yHAAyH;IACzH,yCAkCC;IAED,0HAA0H;IAC1H,yBAOC;IAED,wBAEC;IAED,gCAAgC;IAChC,uCAGC;IAED;;;SAGK;IACL,oCAGC;;CACF;+BA1O8B,mBAAmB"}
|