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.
Notes
This Browser agent version has been temporarily removed; the most up-to-date version is currently agent version 1044.
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
- Added JSONP support (relevant only for PRO+SPA): Browser Interactions that include JSONP requests are now correctly tracked. Previously, browser interactions that included JSONP were ended early and not included in the Breakdowns tab.
Bug fixes
- Fixed a compatibility issue with zone.js: When New Relic and Zone.js v0.8.13 were used together, the context (
this
) was not being set correctly in some of theaddEventListener
calls used by clients. - Correctly send data when methods aren't wrappable: When XHR was not wrappable, the agent did not send data to the collector via XHR in some edge cases. We are now correctly sending the data if XHR exists on the page, even if it's not wrappable.
How to upgrade
To upgrade your agent to the latest version, see Upgrade the Browser agent.
Notes
The Browser Agent, sometimes called the JS 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.
Bug fixes
- Improved Agent Performance: Improvements to how the agent verifies interactions are complete by setting and clearing multiple timers. Previously, the agent would make many unnecessary calls to clearTimeout, and will now only clear timers when appropriate.
- Protect against custom events: Improvements to how the agent determines the event origin for Session Traces. In some libraries that use custom event wrappers, when the agent calls
target
on an event it can throw an exception. The agent now catches these types of exceptions when building Session Traces.
How to upgrade
To upgrade your agent to the latest version, see Upgrade the Browser agent.
Notes
The Browser Agent, sometimes called the JS 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.
Bug fixes
- Do not instrument SPA without a wrappable XHR: In browsers that don't orchestrate the wrapping of XHR, the SPA agent does not collect event data, only metric timeslice data. The agent will still report SPA for browsers that support XHR wrapping. Mobile Safari and a few other browsers didn’t support wrapping the XMLHttpRequest, so they would not produce event data for instrumenting Single Page Apps. They still collect other types of metrics.
- Support setTimeout with a string duration: When you call setTimeout with a string as the duration, browsers will cast this as a number, but the agent did not handle this correctly. We are now handling this case correctly.
- Work around mutation observer memory leak in IE 11: We have discovered that MutationObserver in IE causes a memory leak, so the agent now will prefer setImmediate for IE, and use a resolved promise to schedule the wrapping in Edge (and other browsers that support promises).
- Handle short recursive timers: Some libraries recursively set timers that left our interactions open. The agent now handles this by reducing the max time it will allow to be included in the interaction.
How to upgrade
To upgrade your agent to the latest version, see Upgrade the Browser agent.
Notes
The Browser Agent, sometimes called the JS Agent, has multiple variants: Lite, Pro, Pro+SPA. Unless noted otherwise, all features/improvements/bug fixes are available in all variants of the agent.
Improvements
- Adjusted PageAction limits: Previously, we limited PageAction events to 120 per page load and only 20 events per harvest cycle, resulting in dropped data if a user sent more than 20 pageAction events in a single burst. Increasing the harvest time to 30 seconds also increases the event buffer, allowing users to send up to 60 events per harvest.
- Improved time measurement: Previously, the agent used the system clock to calculate timing, and since the system clock may shift over the lifecycle of a page, the agent could occasionally report inaccurate or unexpectedly negative values. Going forward, the agent will use
perfomance.now()
, which is a monotonically increasing clock that starts fromnavigationStart
. This change will result in more accurate timing for modern browsers.
Bug fixes
- Preserve event listeners: Previously, if the agent doesn't load correctly it affected the functionality of
add-
andremoveEventListener
. These will now function the same whether the agent loads or not.
How to upgrade
To upgrade your agent to the latest version, see Upgrade Browser agent.
Notes
The Browser Agent, sometimes called the JS Agent, has multiple variants: Lite, Pro, Pro+SPA. Unless noted otherwise, all features/improvements/bug fixes are available in all variants of the agent.
New features
- Release ID API: A new API allows you to uniquely identify your current JavaScript version, enabling a richer error feature with source maps identification. Stay tuned for more information and documentation!
Improvements
- Passive Scroll Event Listeners: Previously, the wrapped scroll event listener did not take advantage of an available performance optimization: the passive annotation. By including this annotation, our wrapped scroll listener will allow a non-blocking, smooth scrolling action.
Bug fixes
- XHR With Credentials: Previously, when the agent would send data using an XHR, it would feature-check the
withCredentials
property and set it totrue
if it was available. However, older versions of IE do not allow modification of thewithCredentials
property on unsent XHRs. The agent now wraps the property assignment in a try/catch block to prevent errors.
How to upgrade
To upgrade your agent to the latest version, see Upgrade Browser agent.
Notes
The Browser Agent, sometimes called the JS Agent, has multiple variants: Lite, Pro, Pro+SPA. Unless noted otherwise, all features/improvements/bug fixes are available in all variants of the agent.
New features
- Added the setCurrentRouteName API method [relevant only for Pro+SPA]: The agent now has an API method to set the current route name for the page. This api can be used to set the
previousRouteName
andtargetRouteName
for BrowserInteraction events.
For details on how and why to use this API, see our Browser SPA API Docs
Improvements
- Disabled insecure communication with New Relic: Previously the agent would send RUM data to the router without TLS if the request was initiated from an insecure page. Now the Browser Agent will always use TLS connection when transmitting data.
- Browser Agent no longer mutates the attributes object passed to the addPageAction API: Previously the agent would mutate the attributes object passed to add page actions by adding the default and page attributes onto this object.
Bug fixes
- Fixed a compatibility issue with zone.js: Previously when the Browser Agent and zone.js were both included on a page, additional event handlers would be triggered twice. For example, when event handlers were added as properties, such as
onreadystatechange
, these handlers would be triggered twice in some browsers. This issue has now been resolved. - Fixed a bug with cross-frame callbacks: Previously, when adding event handlers for events in iframes, the agent would attempt to wrap the provided callbacks. When the wrapping logic called the callback belonging to another frame, a permissions exception would be thrown. The agent will now only wrap callbacks created in the same frame.
- Fixed a memory leak when the Browser agent fails to load correctly
How to upgrade
To upgrade your agent to the latest version, see Upgrade Browser agent.