@adobe/helix-rum-enhancer 1.15.2 → 1.16.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 +14 -0
- package/package.json +1 -1
- package/src/index.js +8 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.16.0](https://github.com/adobe/helix-rum-enhancer/compare/v1.15.3...v1.16.0) (2024-05-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **missingresource:** remove feature flag (1.x) ([0bad440](https://github.com/adobe/helix-rum-enhancer/commit/0bad4407a2190eccb0298ce58b60b571aab3e9b3))
|
|
7
|
+
|
|
8
|
+
## [1.15.3](https://github.com/adobe/helix-rum-enhancer/compare/v1.15.2...v1.15.3) (2024-04-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* no lcp target text from missing element ([#162](https://github.com/adobe/helix-rum-enhancer/issues/162)) ([1156663](https://github.com/adobe/helix-rum-enhancer/commit/1156663b0b9c7a4caee742d5f9aaf49be358c5cd))
|
|
14
|
+
|
|
1
15
|
## [1.15.2](https://github.com/adobe/helix-rum-enhancer/compare/v1.15.1...v1.15.2) (2024-04-18)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -99,9 +99,9 @@ sampleRUM.drain('cwv', (() => {
|
|
|
99
99
|
data.cwv[measurement.name] = measurement.value;
|
|
100
100
|
|
|
101
101
|
if (measurement.name === 'LCP' && measurement.entries.length > 0) {
|
|
102
|
-
const { element } = measurement.entries.pop();
|
|
103
|
-
data.target = sampleRUM.targetselector(
|
|
104
|
-
data.source = sampleRUM.sourceselector(
|
|
102
|
+
const { element: el } = measurement.entries.pop();
|
|
103
|
+
data.target = sampleRUM.targetselector(el);
|
|
104
|
+
data.source = sampleRUM.sourceselector(el) || (el && el.outerHTML.slice(0, 30));
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
sampleRUM('cwv', data);
|
|
@@ -182,14 +182,11 @@ new PerformanceObserver((list) => {
|
|
|
182
182
|
.forEach((entry) => {
|
|
183
183
|
sampleRUM('loadresource', { source: entry.name, target: Math.round(entry.duration) });
|
|
184
184
|
});
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
sampleRUM('missingresource', { source: entry.name, target: entry.hostname });
|
|
191
|
-
});
|
|
192
|
-
}
|
|
185
|
+
list.getEntries()
|
|
186
|
+
.filter((entry) => entry.responseStatus === 404)
|
|
187
|
+
.forEach((entry) => {
|
|
188
|
+
sampleRUM('missingresource', { source: entry.name, target: entry.hostname });
|
|
189
|
+
});
|
|
193
190
|
}).observe({ type: 'resource', buffered: true });
|
|
194
191
|
|
|
195
192
|
[...new URLSearchParams(window.location.search).entries()]
|