@adobe/helix-rum-enhancer
Advanced tools
Comparing version 1.10.0 to 1.11.0
@@ -0,1 +1,8 @@ | ||
# [1.11.0](https://github.com/adobe/helix-rum-enhancer/compare/v1.10.0...v1.11.0) (2024-01-17) | ||
### Features | ||
* **observer:** enable tracking of JSON loading for all browsers that have a PerformanceObserver implementation ([c049f93](https://github.com/adobe/helix-rum-enhancer/commit/c049f930f0cc1dc548e42bd8e76cd97709a873d7)) | ||
# [1.10.0](https://github.com/adobe/helix-rum-enhancer/compare/v1.9.1...v1.10.0) (2024-01-16) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@adobe/helix-rum-enhancer", | ||
"version": "1.10.0", | ||
"version": "1.11.0", | ||
"description": "Helix RUM Enhancer", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -140,3 +140,2 @@ /* | ||
} | ||
return sampleRUM.sourceselector(element.parentElement); | ||
@@ -159,13 +158,11 @@ }; | ||
if (window.location.hostname === 'blog.adobe.com') { | ||
const observer = new PerformanceObserver((list) => { | ||
list.getEntries() | ||
.filter((entry) => !entry.responseStatus || entry.responseStatus < 400) | ||
.filter((entry) => window.location.hostname === new URL(entry.name).hostname) | ||
.filter((entry) => new URL(entry.name).pathname.match('.*(\\.plain\\.html|\\.json)$')) | ||
.forEach((entry) => { | ||
sampleRUM('loadresource', { source: entry.name, target: Math.round(entry.duration) }); | ||
}); | ||
}); | ||
observer.observe({ type: 'resource', buffered: true }); | ||
} | ||
const observer = new PerformanceObserver((list) => { | ||
list.getEntries() | ||
.filter((entry) => !entry.responseStatus || entry.responseStatus < 400) | ||
.filter((entry) => window.location.hostname === new URL(entry.name).hostname) | ||
.filter((entry) => new URL(entry.name).pathname.match('.*(\\.plain\\.html|\\.json)$')) | ||
.forEach((entry) => { | ||
sampleRUM('loadresource', { source: entry.name, target: Math.round(entry.duration) }); | ||
}); | ||
}); | ||
observer.observe({ type: 'resource', buffered: true }); |
38740
212