@newrelic/browser-agent 1.303.0-rc.7 → 1.303.0-rc.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/cjs/common/constants/env.cdn.js +1 -1
  2. package/dist/cjs/common/constants/env.npm.js +1 -1
  3. package/dist/cjs/common/util/monkey-patched.js +5 -3
  4. package/dist/cjs/common/window/page-visibility.js +4 -0
  5. package/dist/cjs/common/wrap/wrap-websocket.js +262 -32
  6. package/dist/cjs/features/generic_events/aggregate/index.js +24 -8
  7. package/dist/cjs/features/generic_events/instrument/index.js +13 -3
  8. package/dist/cjs/features/jserrors/aggregate/index.js +4 -1
  9. package/dist/cjs/features/metrics/aggregate/index.js +0 -6
  10. package/dist/cjs/features/metrics/constants.js +2 -4
  11. package/dist/cjs/features/metrics/instrument/index.js +0 -11
  12. package/dist/cjs/features/page_view_timing/instrument/index.js +1 -2
  13. package/dist/esm/common/constants/env.cdn.js +1 -1
  14. package/dist/esm/common/constants/env.npm.js +1 -1
  15. package/dist/esm/common/util/monkey-patched.js +5 -3
  16. package/dist/esm/common/window/page-visibility.js +4 -1
  17. package/dist/esm/common/wrap/wrap-websocket.js +262 -31
  18. package/dist/esm/features/generic_events/aggregate/index.js +24 -8
  19. package/dist/esm/features/generic_events/instrument/index.js +13 -3
  20. package/dist/esm/features/jserrors/aggregate/index.js +4 -1
  21. package/dist/esm/features/metrics/aggregate/index.js +0 -6
  22. package/dist/esm/features/metrics/constants.js +1 -4
  23. package/dist/esm/features/metrics/instrument/index.js +1 -14
  24. package/dist/esm/features/page_view_timing/instrument/index.js +2 -3
  25. package/dist/tsconfig.tsbuildinfo +1 -1
  26. package/dist/types/common/util/monkey-patched.d.ts.map +1 -1
  27. package/dist/types/common/window/page-visibility.d.ts +1 -0
  28. package/dist/types/common/window/page-visibility.d.ts.map +1 -1
  29. package/dist/types/common/wrap/wrap-websocket.d.ts +0 -2
  30. package/dist/types/common/wrap/wrap-websocket.d.ts.map +1 -1
  31. package/dist/types/features/generic_events/aggregate/index.d.ts +0 -1
  32. package/dist/types/features/generic_events/aggregate/index.d.ts.map +1 -1
  33. package/dist/types/features/generic_events/instrument/index.d.ts.map +1 -1
  34. package/dist/types/features/jserrors/aggregate/index.d.ts.map +1 -1
  35. package/dist/types/features/metrics/aggregate/index.d.ts.map +1 -1
  36. package/dist/types/features/metrics/constants.d.ts +0 -1
  37. package/dist/types/features/metrics/constants.d.ts.map +1 -1
  38. package/dist/types/features/metrics/instrument/index.d.ts.map +1 -1
  39. package/dist/types/features/page_view_timing/instrument/index.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/src/common/util/monkey-patched.js +5 -3
  42. package/src/common/window/page-visibility.js +5 -1
  43. package/src/common/wrap/wrap-websocket.js +248 -30
  44. package/src/features/generic_events/aggregate/index.js +26 -8
  45. package/src/features/generic_events/instrument/index.js +13 -3
  46. package/src/features/jserrors/aggregate/index.js +4 -1
  47. package/src/features/metrics/aggregate/index.js +0 -6
  48. package/src/features/metrics/constants.js +0 -4
  49. package/src/features/metrics/instrument/index.js +0 -10
  50. package/src/features/page_view_timing/instrument/index.js +2 -3
  51. package/dist/cjs/features/metrics/aggregate/websocket-detection.js +0 -39
  52. package/dist/esm/features/metrics/aggregate/websocket-detection.js +0 -33
  53. package/dist/types/features/metrics/aggregate/websocket-detection.d.ts +0 -12
  54. package/dist/types/features/metrics/aggregate/websocket-detection.d.ts.map +0 -1
  55. package/src/features/metrics/aggregate/websocket-detection.js +0 -35
@@ -3,53 +3,284 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { globalScope } from '../constants/runtime';
6
- import { now } from '../timing/now';
7
- import { checkState } from '../window/load';
8
6
  import { generateRandomHexString } from '../ids/unique-id';
7
+ import { now } from '../timing/now';
9
8
  import { gosNREUMOriginals } from '../window/nreum';
10
- export const WEBSOCKET_TAG = 'websocket-';
11
- export const ADD_EVENT_LISTENER_TAG = 'addEventListener';
9
+ import { subscribeToPageUnload } from '../window/page-visibility';
12
10
  const wrapped = {};
11
+ const openWebSockets = new Set(); // track all instances to close out metrics on page unload
12
+
13
13
  export function wrapWebSocket(sharedEE) {
14
- if (wrapped[sharedEE.debugId]++) return sharedEE;
15
14
  const originals = gosNREUMOriginals().o;
16
15
  if (!originals.WS) return sharedEE;
17
- function reporter(socketId) {
18
- const createdAt = now();
19
- return function (message, ...data) {
20
- const timestamp = data[0]?.timeStamp || now();
21
- const isLoaded = checkState();
22
- sharedEE.emit(WEBSOCKET_TAG + message, [timestamp, timestamp - createdAt, isLoaded, socketId, ...data]);
23
- };
24
- }
16
+ const wsEE = sharedEE.get('websockets');
17
+ if (wrapped[wsEE.debugId]++) return wsEE;
18
+ wrapped[wsEE.debugId] = 1; // otherwise, first feature to wrap events
19
+
20
+ // This handles page navigation scenarios where the browser closes WebSockets after pagehide fires
21
+ subscribeToPageUnload(() => {
22
+ const unloadTime = now();
23
+ openWebSockets.forEach(ws => {
24
+ ws.nrData.closedAt = unloadTime;
25
+ ws.nrData.closeCode = 1001; // Going Away - standard code for page navigation
26
+ ws.nrData.closeReason = 'Page navigating away';
27
+ ws.nrData.closeWasClean = false;
28
+ if (ws.nrData.openedAt) {
29
+ ws.nrData.connectedDuration = unloadTime - ws.nrData.openedAt;
30
+ }
31
+ wsEE.emit('ws', [ws.nrData], ws);
32
+ });
33
+ });
25
34
  class WrappedWebSocket extends WebSocket {
26
35
  static name = 'WebSocket';
36
+ static toString() {
37
+ // fake native WebSocket when static class is stringified
38
+ return 'function WebSocket() { [native code] }';
39
+ }
40
+ toString() {
41
+ // fake [object WebSocket] when instance is stringified
42
+ return '[object WebSocket]';
43
+ }
44
+ get [Symbol.toStringTag]() {
45
+ // fake [object WebSocket] when Object.prototype.toString.call is used on instance
46
+ return WrappedWebSocket.name;
47
+ }
48
+
49
+ // Private method to tag send, close, and event listener errors with WebSocket ID for JSErrors feature
50
+ #tagError(error) {
51
+ ;
52
+ (error.__newrelic ??= {}).socketId = this.nrData.socketId;
53
+ this.nrData.hasErrors ??= true;
54
+ }
27
55
  constructor(...args) {
28
56
  super(...args);
29
- const socketId = generateRandomHexString(6);
30
- this.report = reporter(socketId);
31
- this.report('new');
32
- const events = ['message', 'error', 'open', 'close'];
33
- /** add event listeners */
34
- events.forEach(evt => {
35
- this.addEventListener(evt, function (e) {
36
- this.report(ADD_EVENT_LISTENER_TAG, {
37
- eventType: evt,
38
- event: e
39
- });
57
+ /** @type {WebSocketData} */
58
+ this.nrData = new WebSocketData(args[0], args[1]);
59
+ this.addEventListener('open', () => {
60
+ this.nrData.openedAt = now();
61
+ ['protocol', 'extensions', 'binaryType'].forEach(prop => {
62
+ this.nrData[prop] = this[prop];
40
63
  });
64
+ openWebSockets.add(this);
65
+ });
66
+ this.addEventListener('message', event => {
67
+ const {
68
+ type,
69
+ size
70
+ } = getDataInfo(event.data);
71
+ this.nrData.messageOrigin ??= event.origin; // the origin of messages thru WS lifetime cannot be changed, so set once is sufficient
72
+ this.nrData.messageCount = (this.nrData.messageCount ?? 0) + 1;
73
+ this.nrData.messageBytes = (this.nrData.messageBytes ?? 0) + size;
74
+ this.nrData.messageBytesMin = Math.min(this.nrData.messageBytesMin ?? Infinity, size);
75
+ this.nrData.messageBytesMax = Math.max(this.nrData.messageBytesMax ?? 0, size);
76
+ if (!(this.nrData.messageTypes ?? '').includes(type)) {
77
+ this.nrData.messageTypes = this.nrData.messageTypes ? "".concat(this.nrData.messageTypes, ",").concat(type) : type;
78
+ }
41
79
  });
80
+ this.addEventListener('close', event => {
81
+ this.nrData.closedAt = now();
82
+ this.nrData.closeCode = event.code;
83
+ this.nrData.closeReason = event.reason;
84
+ this.nrData.closeWasClean = event.wasClean;
85
+ this.nrData.connectedDuration = this.nrData.closedAt - this.nrData.openedAt;
86
+ openWebSockets.delete(this); // remove from tracking set since it's now closed
87
+ wsEE.emit('ws', [this.nrData], this);
88
+ });
89
+ }
90
+ addEventListener(type, listener, ...rest) {
91
+ const wsInstance = this;
92
+ const wrappedListener = typeof listener === 'function' ? function (...args) {
93
+ try {
94
+ return listener.apply(this, args);
95
+ } catch (error) {
96
+ wsInstance.#tagError(error);
97
+ throw error;
98
+ }
99
+ } : listener?.handleEvent ? {
100
+ // case for listener === object with handleEvent
101
+ handleEvent: function (...args) {
102
+ try {
103
+ return listener.handleEvent.apply(listener, args);
104
+ } catch (error) {
105
+ wsInstance.#tagError(error);
106
+ throw error;
107
+ }
108
+ }
109
+ } : listener; // case for listener === null
110
+ return super.addEventListener(type, wrappedListener, ...rest);
111
+ }
112
+ send(data) {
113
+ // Only track metrics if the connection is OPEN; data sent in CONNECTING state throws, and data sent in CLOSING/CLOSED states is silently discarded
114
+ if (this.readyState === WebSocket.OPEN) {
115
+ const {
116
+ type,
117
+ size
118
+ } = getDataInfo(data);
119
+ this.nrData.sendCount = (this.nrData.sendCount ?? 0) + 1;
120
+ this.nrData.sendBytes = (this.nrData.sendBytes ?? 0) + size;
121
+ this.nrData.sendBytesMin = Math.min(this.nrData.sendBytesMin ?? Infinity, size);
122
+ this.nrData.sendBytesMax = Math.max(this.nrData.sendBytesMax ?? 0, size);
123
+ if (!(this.nrData.sendTypes ?? '').includes(type)) {
124
+ this.nrData.sendTypes = this.nrData.sendTypes ? "".concat(this.nrData.sendTypes, ",").concat(type) : type;
125
+ }
126
+ }
127
+ try {
128
+ return super.send(data);
129
+ } catch (error) {
130
+ this.#tagError(error);
131
+ throw error;
132
+ }
42
133
  }
43
- send(...args) {
44
- this.report('send', ...args);
134
+ close(...args) {
45
135
  try {
46
- return super.send(...args);
47
- } catch (err) {
48
- this.report('send-err', ...args);
49
- throw err;
136
+ super.close(...args);
137
+ } catch (error) {
138
+ this.#tagError(error);
139
+ throw error;
50
140
  }
51
141
  }
52
142
  }
53
143
  globalScope.WebSocket = WrappedWebSocket;
54
- return sharedEE;
144
+ return wsEE;
145
+ }
146
+
147
+ /**
148
+ * Returns the data type and size of the WebSocket send data
149
+ * @param {*} data - The data being sent
150
+ * @returns {{ type: string, size: number }} - The type name and size in bytes
151
+ */
152
+ function getDataInfo(data) {
153
+ if (typeof data === 'string') {
154
+ return {
155
+ type: 'string',
156
+ size: new TextEncoder().encode(data).length // efficient way to calculate the # of UTF-8 bytes that WS sends (cannot use string length)
157
+ };
158
+ }
159
+ if (data instanceof ArrayBuffer) {
160
+ return {
161
+ type: 'ArrayBuffer',
162
+ size: data.byteLength
163
+ };
164
+ }
165
+ if (data instanceof Blob) {
166
+ return {
167
+ type: 'Blob',
168
+ size: data.size
169
+ };
170
+ }
171
+ if (data instanceof DataView) {
172
+ return {
173
+ type: 'DataView',
174
+ size: data.byteLength
175
+ };
176
+ }
177
+ if (ArrayBuffer.isView(data)) {
178
+ return {
179
+ type: 'TypedArray',
180
+ size: data.byteLength
181
+ };
182
+ }
183
+ return {
184
+ type: 'unknown',
185
+ size: 0
186
+ };
187
+ }
188
+
189
+ /**
190
+ * WebSocket instrumentation data model
191
+ */
192
+ class WebSocketData {
193
+ /**
194
+ * @param {string} requestedUrl - The URL passed to WebSocket constructor
195
+ * @param {string|string[]} [requestedProtocols] - The protocols passed to WebSocket constructor
196
+ */
197
+ constructor(requestedUrl, requestedProtocols) {
198
+ /** @type {number} Timestamp when the WebSocket was constructed (relative time); will be time corrected later when timeKeeper is available */
199
+ this.timestamp = now();
200
+
201
+ /** @type {string} Most current URL when WebSocket was created; relevant for SPA */
202
+ this.currentUrl = window.location.href;
203
+
204
+ /*
205
+ * pageUrl will be set by addEvent later; unlike timestamp and currentUrl, it's not sensitive to *when* it is set.
206
+ * It should not be explicitly defined here as it will overwrite the default provided by Generic Events later.
207
+ */
208
+
209
+ /** @type {string} Unique identifier for this WebSocket connection */
210
+ this.socketId = generateRandomHexString(8);
211
+
212
+ /** @type {string} The URL requested for the WebSocket connection */
213
+ this.requestedUrl = requestedUrl;
214
+
215
+ /** @type {string} Comma-separated list of requested protocols */
216
+ this.requestedProtocols = Array.isArray(requestedProtocols) ? requestedProtocols.join(',') : requestedProtocols || '';
217
+
218
+ // Properties set when connection opens
219
+ /** @type {number} [openedAt] Timestamp when connection opened */
220
+ this.openedAt = undefined;
221
+
222
+ /** @type {string} [protocol] The sub-protocol selected by the server */
223
+ this.protocol = undefined;
224
+
225
+ /** @type {string} [extensions] The extensions selected by the server */
226
+ this.extensions = undefined;
227
+
228
+ /** @type {string} [binaryType] The binary type ('blob' or 'arraybuffer') */
229
+ this.binaryType = undefined;
230
+
231
+ // Message received metrics
232
+ /** @type {string} [messageOrigin] Origin of messages (set once) */
233
+ this.messageOrigin = undefined;
234
+
235
+ /** @type {number} [messageCount] Total number of messages received */
236
+ this.messageCount = undefined;
237
+
238
+ /** @type {number} [messageBytes] Total bytes received */
239
+ this.messageBytes = undefined;
240
+
241
+ /** @type {number} [messageBytesMin] Minimum message size received */
242
+ this.messageBytesMin = undefined;
243
+
244
+ /** @type {number} [messageBytesMax] Maximum message size received */
245
+ this.messageBytesMax = undefined;
246
+
247
+ /** @type {string} [messageTypes] Comma-separated list of message types received */
248
+ this.messageTypes = undefined;
249
+
250
+ // Send metrics
251
+ /** @type {number} [sendCount] Total number of messages sent */
252
+ this.sendCount = undefined;
253
+
254
+ /** @type {number} [sendBytes] Total bytes sent */
255
+ this.sendBytes = undefined;
256
+
257
+ /** @type {number} [sendBytesMin] Minimum message size sent */
258
+ this.sendBytesMin = undefined;
259
+
260
+ /** @type {number} [sendBytesMax] Maximum message size sent */
261
+ this.sendBytesMax = undefined;
262
+
263
+ /** @type {string} [sendTypes] Comma-separated list of message types sent */
264
+ this.sendTypes = undefined;
265
+
266
+ // Close metrics
267
+ /** @type {number} [closedAt] Timestamp when connection closed */
268
+ this.closedAt = undefined;
269
+
270
+ /** @type {number} [closeCode] WebSocket close code */
271
+ this.closeCode = undefined;
272
+
273
+ /** @type {string} [closeReason] WebSocket close reason */
274
+ this.closeReason = undefined;
275
+
276
+ /** @type {boolean} [closeWasClean] Whether the connection closed cleanly */
277
+ this.closeWasClean = undefined;
278
+
279
+ /** @type {number} [connectedDuration] Duration of the connection in milliseconds */
280
+ this.connectedDuration = undefined;
281
+
282
+ // Error tracking
283
+ /** @type {boolean} [hasErrors] Whether any errors occurred */
284
+ this.hasErrors = undefined;
285
+ }
55
286
  }
@@ -32,7 +32,7 @@ export class Aggregate extends AggregateBase {
32
32
  if (RESERVED_EVENT_TYPES.includes(eventType)) return warn(46);
33
33
  this.addEvent({
34
34
  eventType,
35
- timestamp: this.toEpoch(timestamp),
35
+ timestamp: this.#toEpoch(timestamp),
36
36
  ...attributes
37
37
  }, target);
38
38
  }, this.featureName, this.ee);
@@ -41,7 +41,7 @@ export class Aggregate extends AggregateBase {
41
41
  this.addEvent({
42
42
  ...attributes,
43
43
  eventType: 'PageAction',
44
- timestamp: this.toEpoch(timestamp),
44
+ timestamp: this.#toEpoch(timestamp),
45
45
  timeSinceLoad: timestamp / 1000,
46
46
  actionName: name,
47
47
  referrerUrl: this.referrerUrl,
@@ -68,7 +68,7 @@ export class Aggregate extends AggregateBase {
68
68
  } = aggregatedUserAction.event;
69
69
  const userActionEvent = {
70
70
  eventType: 'UserAction',
71
- timestamp: this.toEpoch(timeStamp),
71
+ timestamp: this.#toEpoch(timeStamp),
72
72
  action: type,
73
73
  actionCount: aggregatedUserAction.count,
74
74
  actionDuration: aggregatedUserAction.relativeMs[aggregatedUserAction.relativeMs.length - 1],
@@ -154,7 +154,7 @@ export class Aggregate extends AggregateBase {
154
154
  this.addEvent({
155
155
  ...detailObj,
156
156
  eventType: 'BrowserPerformance',
157
- timestamp: this.toEpoch(entry.startTime),
157
+ timestamp: this.#toEpoch(entry.startTime),
158
158
  entryName: entry.name,
159
159
  entryDuration: entry.duration,
160
160
  entryType: type
@@ -220,7 +220,7 @@ export class Aggregate extends AggregateBase {
220
220
  const event = {
221
221
  ...entryObject,
222
222
  eventType: 'BrowserPerformance',
223
- timestamp: Math.floor(agentRef.runtime.timeKeeper.correctRelativeTimestamp(entryObject.startTime)),
223
+ timestamp: this.#toEpoch(entryObject.startTime),
224
224
  entryName: cleanURL(name),
225
225
  entryDuration: duration,
226
226
  firstParty
@@ -240,13 +240,29 @@ export class Aggregate extends AggregateBase {
240
240
  const event = {
241
241
  ...customAttributes,
242
242
  eventType: 'BrowserPerformance',
243
- timestamp: Math.floor(agentRef.runtime.timeKeeper.correctRelativeTimestamp(start)),
243
+ timestamp: this.#toEpoch(start),
244
244
  entryName: n,
245
245
  entryDuration: duration,
246
246
  entryType: 'measure'
247
247
  };
248
248
  this.addEvent(event, target);
249
249
  }, this.featureName, this.ee);
250
+ if (agentRef.init.feature_flags.includes('websockets')) {
251
+ registerHandler('ws-complete', nrData => {
252
+ const event = {
253
+ ...nrData,
254
+ eventType: 'WebSocket',
255
+ timestamp: this.#toEpoch(nrData.timestamp),
256
+ openedAt: this.#toEpoch(nrData.openedAt),
257
+ closedAt: this.#toEpoch(nrData.closedAt)
258
+ };
259
+
260
+ // Report supportability metrics for WebSocket completion
261
+ this.reportSupportabilityMetric('WebSocket/Completed/Seen');
262
+ this.reportSupportabilityMetric('WebSocket/Completed/Bytes', stringify(event).length);
263
+ this.addEvent(event);
264
+ }, this.featureName, this.ee);
265
+ }
250
266
  this.drain();
251
267
  });
252
268
  }
@@ -277,7 +293,7 @@ export class Aggregate extends AggregateBase {
277
293
  }
278
294
  const defaultEventAttributes = {
279
295
  /** should be overridden by the event-specific attributes, but just in case -- set it to now() */
280
- timestamp: Math.floor(this.agentRef.runtime.timeKeeper.correctRelativeTimestamp(now())),
296
+ timestamp: this.#toEpoch(now()),
281
297
  /** all generic events require pageUrl(s) */
282
298
  pageUrl: cleanURL('' + initialLocation),
283
299
  currentUrl: cleanURL('' + location),
@@ -305,7 +321,7 @@ export class Aggregate extends AggregateBase {
305
321
  at: this.agentRef.info.atts
306
322
  };
307
323
  }
308
- toEpoch(timestamp) {
324
+ #toEpoch(timestamp) {
309
325
  return Math.floor(this.agentRef.runtime.timeKeeper.correctRelativeTimestamp(timestamp));
310
326
  }
311
327
  #trackSupportabilityMetrics() {
@@ -20,12 +20,16 @@ import { wrapFetch } from '../../../common/wrap/wrap-fetch';
20
20
  import { wrapXhr } from '../../../common/wrap/wrap-xhr';
21
21
  import { parseUrl } from '../../../common/url/parse-url';
22
22
  import { extractUrl } from '../../../common/url/extract-url';
23
+ import { wrapWebSocket } from '../../../common/wrap/wrap-websocket';
23
24
  export class Instrument extends InstrumentBase {
24
25
  static featureName = FEATURE_NAME;
25
26
  constructor(agentRef) {
26
27
  super(agentRef, FEATURE_NAME);
28
+ const websocketsEnabled = agentRef.init.feature_flags.includes('websockets');
29
+ const ufEnabled = agentRef.init.feature_flags.includes('user_frustrations');
30
+
27
31
  /** config values that gate whether the generic events aggregator should be imported at all */
28
- const genericEventSourceConfigs = [agentRef.init.page_action.enabled, agentRef.init.performance.capture_marks, agentRef.init.performance.capture_measures, agentRef.init.user_actions.enabled, agentRef.init.performance.resources.enabled];
32
+ const genericEventSourceConfigs = [agentRef.init.page_action.enabled, agentRef.init.performance.capture_marks, agentRef.init.performance.capture_measures, agentRef.init.performance.resources.enabled, agentRef.init.user_actions.enabled, websocketsEnabled];
29
33
 
30
34
  /** feature specific APIs */
31
35
  setupAddPageActionAPI(agentRef);
@@ -33,13 +37,13 @@ export class Instrument extends InstrumentBase {
33
37
  setupFinishedAPI(agentRef);
34
38
  setupRegisterAPI(agentRef);
35
39
  setupMeasureAPI(agentRef);
36
- const ufEnabled = agentRef.init.feature_flags.includes('user_frustrations');
37
- let historyEE;
40
+ let historyEE, websocketsEE;
38
41
  if (isBrowserScope && ufEnabled) {
39
42
  wrapFetch(this.ee);
40
43
  wrapXhr(this.ee);
41
44
  historyEE = wrapHistory(this.ee);
42
45
  }
46
+ if (websocketsEnabled) websocketsEE = wrapWebSocket(this.ee);
43
47
  if (isBrowserScope) {
44
48
  if (agentRef.init.user_actions.enabled) {
45
49
  OBSERVED_EVENTS.forEach(eventType => windowAddEventListener(eventType, evt => handle('ua', [evt], undefined, this.featureName, this.ee), true));
@@ -97,6 +101,12 @@ export class Instrument extends InstrumentBase {
97
101
  });
98
102
  }
99
103
  }
104
+ if (websocketsEnabled) {
105
+ // this can apply outside browser scope such as in worker
106
+ websocketsEE.on('ws', nrData => {
107
+ handle('ws-complete', [nrData], undefined, this.featureName, this.ee);
108
+ });
109
+ }
100
110
  try {
101
111
  this.removeOnAbort = new AbortController();
102
112
  } catch (e) {}
@@ -179,10 +179,13 @@ export class Aggregate extends AggregateBase {
179
179
  if (this.shouldAllowMainAgentToCapture(target)) handle('trace-jserror', jsErrorEvent, undefined, FEATURE_NAMES.sessionTrace, this.ee);
180
180
  // still send EE events for other features such as above, but stop this one from aggregating internal data
181
181
  if (this.blocked) return;
182
- if (err?.__newrelic?.[this.agentIdentifier]) {
182
+ if (err.__newrelic?.[this.agentIdentifier]) {
183
183
  params._interactionId = err.__newrelic[this.agentIdentifier].interactionId;
184
184
  params._interactionNodeId = err.__newrelic[this.agentIdentifier].interactionNodeId;
185
185
  }
186
+ if (err.__newrelic?.socketId) {
187
+ customAttributes.socketId = err.__newrelic.socketId;
188
+ }
186
189
  if (this.shouldAllowMainAgentToCapture(target)) {
187
190
  const softNavInUse = Boolean(this.agentRef.features?.[FEATURE_NAMES.softNav]);
188
191
  // Note: the following are subject to potential race cond wherein if the other feature aren't fully initialized, it'll be treated as there being no associated interaction.
@@ -143,12 +143,6 @@ export class Aggregate extends AggregateBase {
143
143
  // webdriver detection
144
144
  if (navigator.webdriver) this.storeSupportabilityMetrics('Generic/WebDriver/Detected');
145
145
 
146
- // WATCHABLE_WEB_SOCKET_EVENTS.forEach(tag => {
147
- // registerHandler('buffered-' + WEBSOCKET_TAG + tag, (...args) => {
148
- // handleWebsocketEvents(this.storeSupportabilityMetrics.bind(this), tag, ...args)
149
- // }, this.featureName, this.ee)
150
- // })
151
-
152
146
  /** all the harvest metadata metrics need to be evaluated simulataneously at unload time so just temporarily buffer them and dont make SMs immediately from the data */
153
147
  registerHandler('harvest-metadata', (harvestMetadataObject = {}) => {
154
148
  try {
@@ -2,12 +2,9 @@
2
2
  * Copyright 2020-2025 New Relic, Inc. All rights reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
-
6
- import { ADD_EVENT_LISTENER_TAG } from '../../common/wrap/wrap-websocket';
7
5
  import { FEATURE_NAMES } from '../../loaders/features/features';
8
6
  export const FEATURE_NAME = FEATURE_NAMES.metrics;
9
7
  export const SUPPORTABILITY_METRIC = 'sm';
10
8
  export const CUSTOM_METRIC = 'cm';
11
9
  export const SUPPORTABILITY_METRIC_CHANNEL = 'storeSupportabilityMetrics';
12
- export const CUSTOM_METRIC_CHANNEL = 'storeEventMetrics';
13
- export const WATCHABLE_WEB_SOCKET_EVENTS = ['new', 'send', 'close', ADD_EVENT_LISTENER_TAG];
10
+ export const CUSTOM_METRIC_CHANNEL = 'storeEventMetrics';
@@ -6,24 +6,11 @@
6
6
  import { isBrowserScope } from '../../../common/constants/runtime';
7
7
  import { handle } from '../../../common/event-emitter/handle';
8
8
  import { InstrumentBase } from '../../utils/instrument-base';
9
- import { FEATURE_NAME,
10
- // WATCHABLE_WEB_SOCKET_EVENTS,
11
- SUPPORTABILITY_METRIC_CHANNEL } from '../constants';
12
- // import { handle } from '../../../common/event-emitter/handle'
13
- // import { WEBSOCKET_TAG, wrapWebSocket } from '../../../common/wrap/wrap-websocket'
14
-
9
+ import { FEATURE_NAME, SUPPORTABILITY_METRIC_CHANNEL } from '../constants';
15
10
  export class Instrument extends InstrumentBase {
16
11
  static featureName = FEATURE_NAME;
17
12
  constructor(agentRef) {
18
13
  super(agentRef, FEATURE_NAME);
19
- // wrapWebSocket(this.ee) - feb'25 : removing wrapping again to avoid integration issues
20
-
21
- // WATCHABLE_WEB_SOCKET_EVENTS.forEach((suffix) => {
22
- // this.ee.on(WEBSOCKET_TAG + suffix, (...args) => {
23
- // handle('buffered-' + WEBSOCKET_TAG + suffix, [...args], undefined, this.featureName, this.ee)
24
- // })
25
- // })
26
-
27
14
  if (isBrowserScope) {
28
15
  document.addEventListener('securitypolicyviolation', e => {
29
16
  handle(SUPPORTABILITY_METRIC_CHANNEL, ['Generic/CSPViolation/Detected'], undefined, this.featureName, this.ee);
@@ -3,8 +3,7 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { handle } from '../../../common/event-emitter/handle';
6
- import { subscribeToVisibilityChange } from '../../../common/window/page-visibility';
7
- import { windowAddEventListener } from '../../../common/event-listener/event-listener-opts';
6
+ import { subscribeToPageUnload, subscribeToVisibilityChange } from '../../../common/window/page-visibility';
8
7
  import { InstrumentBase } from '../../utils/instrument-base';
9
8
  import { FEATURE_NAME } from '../constants';
10
9
  import { isBrowserScope } from '../../../common/constants/runtime';
@@ -19,7 +18,7 @@ export class Instrument extends InstrumentBase {
19
18
  subscribeToVisibilityChange(() => handle('docHidden', [now()], undefined, FEATURE_NAME, this.ee), true);
20
19
 
21
20
  // Window fires its pagehide event (typically on navigation--this occurrence is a *subset* of vis change); don't defer this unless it's guarantee it cannot happen before load(?)
22
- windowAddEventListener('pagehide', () => handle('winPagehide', [now()], undefined, FEATURE_NAME, this.ee));
21
+ subscribeToPageUnload(() => handle('winPagehide', [now()], undefined, FEATURE_NAME, this.ee));
23
22
  this.importAggregator(agentRef, () => import(/* webpackChunkName: "page_view_timing-aggregate" */'../aggregate'));
24
23
  }
25
24
  }
@@ -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/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/types.js","../src/common/ids/bundle-id.js","../src/common/ids/id.js","../src/common/ids/unique-id.js","../src/common/serialize/bel-serializer.js","../src/common/session/constants.js","../src/common/session/session-entity.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/canonicalize-url.js","../src/common/url/clean-url.js","../src/common/url/encode.js","../src/common/url/extract-url.js","../src/common/url/location.js","../src/common/url/parse-url.js","../src/common/url/protocol.js","../src/common/util/attribute-size.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/mfe.js","../src/common/util/monkey-patched.js","../src/common/util/obfuscate.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/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/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-jsonp.js","../src/common/wrap/wrap-logger.js","../src/common/wrap/wrap-mutation.js","../src/common/wrap/wrap-promise.js","../src/common/wrap/wrap-timer.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/aggregate/websocket-detection.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/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/spa/constants.js","../src/features/spa/index.js","../src/features/spa/aggregate/index.js","../src/features/spa/aggregate/interaction-node.js","../src/features/spa/aggregate/interaction.js","../src/features/spa/aggregate/serializer.js","../src/features/spa/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/features/utils/nr1-debugger.js","../src/interfaces/registered-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/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
+ {"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/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/types.js","../src/common/ids/bundle-id.js","../src/common/ids/id.js","../src/common/ids/unique-id.js","../src/common/serialize/bel-serializer.js","../src/common/session/constants.js","../src/common/session/session-entity.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/canonicalize-url.js","../src/common/url/clean-url.js","../src/common/url/encode.js","../src/common/url/extract-url.js","../src/common/url/location.js","../src/common/url/parse-url.js","../src/common/url/protocol.js","../src/common/util/attribute-size.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/mfe.js","../src/common/util/monkey-patched.js","../src/common/util/obfuscate.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/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/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-jsonp.js","../src/common/wrap/wrap-logger.js","../src/common/wrap/wrap-mutation.js","../src/common/wrap/wrap-promise.js","../src/common/wrap/wrap-timer.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/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/spa/constants.js","../src/features/spa/index.js","../src/features/spa/aggregate/index.js","../src/features/spa/aggregate/interaction-node.js","../src/features/spa/aggregate/interaction.js","../src/features/spa/aggregate/serializer.js","../src/features/spa/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/features/utils/nr1-debugger.js","../src/interfaces/registered-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/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":"monkey-patched.d.ts","sourceRoot":"","sources":["../../../../src/common/util/monkey-patched.js"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,iCAHW,UAAW,GACT,OAAO,CAYnB"}
1
+ {"version":3,"file":"monkey-patched.d.ts","sourceRoot":"","sources":["../../../../src/common/util/monkey-patched.js"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,iCAHW,UAAW,GACT,OAAO,CAcnB"}
@@ -4,4 +4,5 @@
4
4
  * @returns void
5
5
  */
6
6
  export function subscribeToVisibilityChange(cb: Function, toHiddenOnly?: boolean, capture: any, abortSignal: any): void;
7
+ export function subscribeToPageUnload(cb: any, capture: any, abortSignal: any): void;
7
8
  //# sourceMappingURL=page-visibility.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"page-visibility.d.ts","sourceRoot":"","sources":["../../../../src/common/window/page-visibility.js"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,yEAHW,OAAO,wCAajB"}
1
+ {"version":3,"file":"page-visibility.d.ts","sourceRoot":"","sources":["../../../../src/common/window/page-visibility.js"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,yEAHW,OAAO,wCAajB;AAED,qFAEC"}
@@ -1,4 +1,2 @@
1
1
  export function wrapWebSocket(sharedEE: any): any;
2
- export const WEBSOCKET_TAG: "websocket-";
3
- export const ADD_EVENT_LISTENER_TAG: "addEventListener";
4
2
  //# sourceMappingURL=wrap-websocket.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wrap-websocket.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-websocket.js"],"names":[],"mappings":"AAeA,kDA6CC;AAlDD,4BAA6B,YAAY,CAAA;AACzC,qCAAsC,kBAAkB,CAAA"}
1
+ {"version":3,"file":"wrap-websocket.d.ts","sourceRoot":"","sources":["../../../../src/common/wrap/wrap-websocket.js"],"names":[],"mappings":"AAaA,kDA2IC"}