New Features
Privacy: Added the ability for admin users to toggle cookie collection On/Off via Browser Application Settings UI
The agent now accepts new configuration privacy.cookies_enabled
. When it is set to false (OFF), the agent doesn't write any third party cookies (JSESSIONID & NREUM) and it also notifies the intake server to not return a third party cookie. By default, all current and newly created applications will have this value set to true (ON), so there will be no change in the data currently being collected by the agent. Admin users must toggle the setting to OFF and redeploy the agent in order to see this change take effect. Once cookie collection is set to false, users should no longer see session information captured with their event data. If a session was already in progress, that data will continue to be collected until that session expires. New sessions should report a null value.
Please note that auto-injected apps will receive this update before the UI option is available. See release dates below.
To learn more about how New Relic Browser uses cookies, see our documentation. For more information on security considerations, specifically around cookies, visit our Security for Browser documentation.
Release Dates
- Auto-injected apps - May 28, 2020
- Copy/paste apps - June 1, 2020
- Corresponding UI changes - June 1, 2020
Issues Resolved
Fixed issue with document XHR requests
In some cases, the agent was causing a DOMException error when getting the size of XHR responses for requests with document
response type.
Issue Resolution
Resolved a bug that caused a script error when the windowUnload event fired. This issue affected only Internet Explorer prior to version 9.
New Features
With this release of the New Relic Browser agent, we now support new metrics, largestContentfulPaint and windowUnload, in our PageViewTiming event. With the release of Chrome 77, Google now reports a metric called largest contentful paint. This metric, LCP for short, reports the render time of the largest content element visible in the viewport, along with the element size and element Id values. This new metric comes after extensive research by Google. They found that the more accurate way to measure when the main content of a page is loaded is to look at when the largest element was rendered. Largest Contentful Paint is replacing First Meaningful Paint (which is now a deprecated metric) in Google Lighthouse as well. Additionally, LCP is considered the "field" equivalent to the Speed Index "lab" metric.
Largest Contentful Paint is updated over time, but captured and reported when one of these three criteria is met:
- A user interacts with the page, thus potentially changing the content in the viewport
- The user closes the page (the window unload event fires)
- If no other other interaction happens, and we have received a LCP value, we will report that value after 1 minute has passed
- If we have not received a value, and no interaction has occurred after a minute, we will simply wait until we have received any value for LCP. This would only occur for very high values (> 1minute) of LCP.
In addition to this metric, we added the windowUnload event to PageViewTiming, so you can see when your users are most commonly closing their sessions. This metric is supported by all browsers on both desktop and mobile devices.
For more information about these new metrics, supporting attributes and browser compatibility, visit our PageViewTiming documentation.
Issue Fixes
- Fix to resolve repeated InvalidStateError errors associated with IE11 and some Edge versions.
How to upgrade
To upgrade your agent to the latest version, see Upgrade the Browser agent.
Notes
This agent release includes functionality to support the addition of cross-origin resource sharing (CORS) for Browser's distributed tracing feature. This agent will be rolled out prior to the feature availability in the UI. Please note that the Browser-distributed-tracing feature is only supported with our Browser Pro + SPA agent. Full feature availability delivered on Jan. 2, 2019.
Agent release schedule Browser distributed tracing CORS support
- APM auto-injected agents: 12/19/2019
- Copy/Paste agent: 12/30/2019
Distributed tracing for cross-origin AJAX calls
The agent can now add the newrelic
distributed tracing header to outgoing cross-origin AJAX calls. The origins that the agent should add headers to must be defined in the distributed_tracing.allowed_origins
configuration section. Users can now enable CORS from the Browser 'Application settings' page. For complete feature documentation, visit the Enable cross-origin resource sharing (CORS) section of our Browser data in distributed tracing documentation.
New features
Support for End User Originated Spans in Distributed Tracing
New Relic now supports end-to-end distributed tracing with this release. For our Browser & APM Pro customers, you can now enable the Browser spans for any app that uses our Browser Pro + SPA agent.
This MVP includes support for same-origin AJAX requests that originate during a BrowserInteraction event. This AJAX request will be listed as the root entry span for a trace.
Learn More
- For more details about APM & Browser agent version requirements and enablement, see our Browser Data in Distributed Tracing Page. Please note that not all APM agents are supported at this time.
- For more details about all supported Span attributes, visit our Event Data Dictionary
Known Issues
- Enabling Browser in Distributed Tracing for use with current versions of these language agents, Java, PHP, and C, will result in disconnected traces (single span traces for all Browser requests) and potentially the loss of APM transaction traces and spans. Please see the APM compatibility requirements for supported versions and estimated release dates.
New PageViewTiming Event to capture User Centric Perceived Performance metrics in real time
With this release, we are tying together the visual and responsiveness performance for our customer's site. With every page view, the agent is now capturing the time of the first interaction along with FID (First Input Delay). The existing paint timing metrics (First Paint and First Contentful Paint) are now collected even when they occur after the load event. All of these new metrics are captured on the new PageViewTiming events, available in Insights. This new event type is available for all agents, but requires a Browser Pro subscription.
Visit our New Relic Event Data Dictionary for a list of attributes and more details about the PageViewTiming event.
First Interaction
First Interaction timing captures the moment in time that a user first engages with a site. Within this timing, we also capture the type of interaction (click, key, mousedown, etc). This timing represents the first step in calculating the First Input Delay, which is the time from First Interaction to the moment that the site responds (is interactive).
First Input Delay
FID is a metric that tracks the delay between the time a user can attempt to interact with a part of the site (for example, when they click a link, tap on a button, or use a custom, JavaScript-powered control), and the time that the interface is able to respond to that interaction. We have all experienced situations where a webpage has visibly loaded, but when we try to click around on buttons or any JavaScript-powered interactive elements, nothing responds. This delay is what the FID metric tracks.
The FID metric is in some ways an intersection of the First Contentful Paint and Time to Interactive metrics. It lies in the middle of those two points, measuring the time between the FCP (and therefore when a first input can be made) and when the browser’s main thread is able to respond to any interactions. One major point of FID that differentiates it from Time to Interactive is that it requires a user to interact! TTI can be calculated without user input, so it is somewhat less powerful in the sense that it isn't providing any new information about my user's active experience or frustration, we can only assume that slow = bad. Why only consider the first input
Learn more
- For more information and query examples, see our PageViewTiming event documentation.
- For more information about the Paint Timing browser compatibility, see the Browser compatibility and requirements documentation.
- For more information about User-Centric Perceived Performance metrics, visit the Google Developers Web Fundamentals Guides on Performance.
- For more information about the difference between FID and TTI, see When Users Click: Tracking First Input Delay
Improvements
- Browser interactions now wait on external scripts to finish loading: Browser interactions measure the time of all Javascript code that runs as a result of an interaction. The agent now includes the time it takes to load and execute external scripts. This is useful, for example, when the code started by an interaction must be loaded first (lazy loading).
How to upgrade
To upgrade your agent to the latest version, see Upgrade the Browser agent.
New Features
First Paint and First Contentful Paint values are now being collected: For browsers that support the Paint Timing API, these two values are now collected and made available as attributes on the PageView and BrowserInteraction (initial load) events.
- Definitions for each attribute in BrowserInteractions and PageViews are available in the New Relic event data dictionary.
- For more information about the Paint Timing browser compatibility, see the Browser compatibility and requirements documentation.
- For more information about User-Centric Perceived Performance metrics, visit the Google Developers Web Fundamentals Guides on Performance.
- Read more on our New Relic blog.
Improvements
- Updated instrumentation of the History API: The history API methods are now instrumented on the History object constructor. This is to ensure that our instrumentation does not override other libraries that wrap these methods.
- Updated instrumentation of DOM API methods: The DOM API methods used for JSONP instrumentation are now instrumented on the Node object prototype (as opposed to HTMLElement lower in the prototype chain). This is to ensure that our instrumentation does not override other libraries that wrap these methods.
How to upgrade
To upgrade your agent to the latest version, see Upgrade the Browser agent.
Bug fixes
- Fixed issue with capturing AJAX status code in Angular apps: Angular calls abort() on the XHR object after it successfully finishes. This was seen by our instrumentation as a call that did not finish, and as a result status code was set to
0
and reported as a network error. This fix addresses this use case by capturing status code before the call is aborted.
New features
- Custom attributes are now added to JavascriptError events: Custom attributes collected with the setCustomAttribute() and interaction.setAttribute() API methods are now added to JavascriptError events.
- Updated the noticeError() API: The noticeError() API method now accepts a second argument for custom attributes. For more details and examples, see the noticeError() documentation.
Improvements
- Updated the timing of when page URL is collected: The URL collected by the agent and used for page view names is now collected after the load event to account for redirects. Currently, we are using the referrer header value from the initial agent call for transaction naming and for URL attributes on Insights events. The agent also sends the URL value as a part of its payload to get around HTTP header stripping. This update brings this value on a par with the HTTP header by capturing it at the time the agent call is made.
How to upgrade
To upgrade your agent to the latest version, see Upgrade the Browser agent.
Notes
The Browser agent, sometimes called the JavaScript agent, has multiple variants: Lite, Pro, and Pro+SPA. Unless noted otherwise, all features/improvements/bug fixes are available in all variants of the agent.
New features
- Action Text: The agent now captures the text of the HTML element that was clicked when a browser interaction started. This value is stored as an attribute called
actionText
on the BrowserInteraction events. There is also a new API actionText, which can be used to manually set the action text value.
Bug fixes
- The agent now uses a fallback method for collecting data when sendBeacon fails: Browsers can return false from sendBeacon call when it cannot be completed. The agent now detects it and falls back to a different method to ensure data is captured.
- Fixed calculating stackHash value in Safari 10 and 11: The stackHash value was not being properly calculated for global errors in Safari 10 and 11, causing incorrect grouping of errors across all browsers.
- Fixed issue with calling fetch without any arguments: On certain versions of the Safari browser, calling fetch without any arguments is permitted. Other browsers, in contrast, do not allow this and throw an error. This also prevented the agent from working properly.
- Removed response size calculation for streaming fetch calls: Previously, the agent cloned the response of a fetch call and read the response body in order to capture its size. In certain versions of the Safari browser this caused other clone calls to fail. As a result, the agent now only uses the content-length header, when available, to capture response size.
How to upgrade
To upgrade your agent to the latest version, see Upgrade the Browser agent.
Notes
The Browser agent, sometimes called the JavaScript agent, has multiple variants: Lite, Pro, and Pro+SPA. Unless noted otherwise, all features/improvements/bug fixes are available in all variants of the agent.
New features
- Link JS Errors to Browser Interactions (relevant only for PRO+SPA): When a JS error occurs inside a browser interaction event, the error will now be associated with the interaction via Insights attributes.
BrowserInteraction, AjaxRequest, and BrowserTiming events will now have the following attributes: browserInteractionId
, eventId
, and parentEventId
.
Bug fixes
- JSONP Tracking Breaks in some versions of Safari (relevant only for PRO+SPA): Previously, the agent would cause Safari browsers to lock up when JSONP requests returned large data. The agent no longer calculates JSONP response size.
How to upgrade
To upgrade your agent to the latest version, see Upgrade the Browser agent.