From 153f627f522c4bdac6da7a6d390ea530d09d4750 Mon Sep 17 00:00:00 2001 From: Krishna Kapadia Date: Wed, 3 Mar 2021 16:51:47 +1300 Subject: [PATCH 1/2] Feat: enabled tracking core web vitals by default. --- README.md | 2 ++ src/raygun.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4062602e..1b51e802 100644 --- a/README.md +++ b/README.md @@ -198,6 +198,8 @@ _Note: navigator.sendBeacon is used to send RUM payloads when a page is unloadin `automaticPerformanceCustomTimings` - When enabled Raygun4JS will track each `window.performance.measure` call as a custom timing entry. This enables developers to use a more native API for tracking performance timings. More information about `performance.measure` can be found on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure). +`trackCoreWebVitals` - When enabled Raygun4JS will automatically track and report Core Web Vitals. + An example raygun4js configuration: ```javascript diff --git a/src/raygun.js b/src/raygun.js index b48d28db..f6927f61 100644 --- a/src/raygun.js +++ b/src/raygun.js @@ -41,7 +41,7 @@ var raygunFactory = function(window, $, undefined) { _disablePulse = true, _wrapAsynchronousCallbacks = false, _automaticPerformanceCustomTimings = false, - _trackCoreWebVitals = false, + _trackCoreWebVitals = true, _customData = {}, _tags = [], _user, @@ -122,7 +122,7 @@ var raygunFactory = function(window, $, undefined) { _setCookieAsSecure = options.setCookieAsSecure || false; _captureMissingRequests = options.captureMissingRequests || false; _automaticPerformanceCustomTimings = options.automaticPerformanceCustomTimings || false; - _trackCoreWebVitals = options.trackCoreWebVitals || false; + _trackCoreWebVitals = options.trackCoreWebVitals || true; if (options.apiUrl) { _raygunApiUrl = options.apiUrl; From 703f804b2ac1a25b300fd2e4eed7c020f3ce1e03 Mon Sep 17 00:00:00 2001 From: Krishna Kapadia Date: Thu, 4 Mar 2021 09:00:39 +1300 Subject: [PATCH 2/2] Docs: updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1b51e802..2ab4f2b0 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ _Note: navigator.sendBeacon is used to send RUM payloads when a page is unloadin `automaticPerformanceCustomTimings` - When enabled Raygun4JS will track each `window.performance.measure` call as a custom timing entry. This enables developers to use a more native API for tracking performance timings. More information about `performance.measure` can be found on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure). -`trackCoreWebVitals` - When enabled Raygun4JS will automatically track and report Core Web Vitals. +`trackCoreWebVitals` - When enabled, Raygun4JS will automatically track and report Core Web Vitals. This is enabled by default. An example raygun4js configuration: