Releases: newrelic/newrelic-browser-agent
v1.229.0
v1.229.0
Use semantic versioning scheme
The agent will now utilize semantic versioning for subsequent releases. The previous version (1228) will carry forward into 1.229.0, and so on.
Use web-vitals
library for internal timing calculations
In an effort to align and standardize the timings the agent collects, the agent now uses the Google CWV library to track page timings such as CLS, LCP, FCP, TTFB and more. See Core Web Vitals documentation for more information.
Ship the Browser Agent repository to NPM
The Browser Agent repository will now be available as a pre-release NPM package. See @newrelic/browser-agent for more information.
v1228
v1227
v1227
Added INP and long tasks reporting
The interaction-to-next-paint metric is now calculated and reported at the end of user sessions, via the Google CWV library. In addition, long continuously executed and blocking scripts detected by the PerformanceLongTaskTiming API are also forwarded to New Relic. This latter functionality is off
by default, until a curated UI experience is created to utilize this data.
Revert unwrapping of globals on agent abort
Partial revert of graceful handling change made in v1225 that unwrapped modified global APIs and handlers, which caused integration issues with other wrapping libraries and code.
Add internal metrics to evaluate feasibility page resource harvests
Internal metrics were added to track the feasibility and impact of collecting page resource information using the PerformanceObserver resource timings, such as scripts, images, network calls, and more.
Add resiliency around SPA interaction saving
Added resiliency code around SPA interaction node save functionality to ensure a cancelled interaction node without a parent further up the interaction tree does not cause an exception to be raised from the agent.
Collect supportability metrics at the end of page life
Collate all of the internal statistic metrics calls, which--of today--are sent at page start and periodically, into one call made when the end user is leaving the page.
v1226
v1226
Revert xhr deny list timeslice metrics
Customers were losing visibility into all calls on the page when denying timeslice metrics based on the deny list. This change reverts to the behaviour seen in all previous versions of the Browser Agent.
Enable back/forward cache
Updating the agent default configuration to enable the back/forward cache feature previously released in version 1222 by default.
Handle unhandledPromiseRejections more gracefully
The agent will attempt to handle niche objects throw from unhandledPromiseRejection
events more gracefully. These cases could include objects with frozen or static properties, or custom extensions of the Error class without a set
method in place.
Disable metrics for missing entitlement
Fixing issue where metrics harvesting was not being halted when the agent RUM call indicated the account did not have entitlement to the jserrors endpoint. Before this change, customers missing this entitlement would see network calls to the New Relic jserrors endpoint result in 403 or 409 errors.
v1225
v1225
Gracefully abort agent if not fully instantiated
When importing of agent code fails, as when content gets blocked, the agent will clean up memory, the global scope, and any wrapped or modified APIs as much as feasible.
Refactor wrapping of Promise object
The agent's wrapping of the Promise
object has been refactored to address conflicts with third party libraries and to add newer methods available on the native object. The new wrapping implementation is more conventional and less error-prone.
Fix uncaught promise error introduced in v1223
In some cases of failure to import agent script chunk "629", an error was thrown rather than caught and logged as a warning. The uncaught promise error responsible for this unintended behavior has been fixed.
Resolve Google indexing of agent relative paths
In previous versions, the agent script included relative paths to its lazy-loaded chunks, which Googlebot picked up and attempted to index as pages. This change removes those relatives paths from the loader and centralizes our lazy chunk loading of agent features.
v1224
v1224
Support SPA, XHR, and session trace features on Chrome for iOS
Previously, the agent didn't collect SPA browser interactions, XHR events, or session trace data in Chrome for iOS, which uses the webkit engine with modifications. The agent now collects the same data in Chrome for iOS as in other supported browsers.
Fix multiple custom interaction end times
Fixed an issue where multiple custom interactions harvested at the same time would result in only one interaction being persisted in New Relic.
Prevent AJAX time slice metrics based on deny list
Prevent time slice metric collection for AJAX calls when such a call matches an entry in the AJAX deny list.
Bind navigator scope to sendBeacon
Some browser versions will throw errors if sendBeacon doesn't have the navigator scope bound to it. A fail-safe action of binding the navigator scope to sendBeacon was added to try to support those browsers.
Expose build version to newrelic global
The build version is exposed to the newrelic
global object. You can access it with newrelic.intializedAgents[<agentID>].runtime.version
.
Add automation for documentation site updates on new releases
A new release of the browser agent will automatically raise a PR to the documentation site with the relevant changelog items.
Preserve unhandledPromiseRejection reasons as human-readable strings in error payloads
The agent will attempt to preserve unhandledPromiseRejection
reasons as human-readable messages on the Error payload that gets harvested. The previous strategy didn't always work, because Promise.reject
can pass any value, not just strings.
Fix missing interactions for dynamic routes in Next/React
Fixed an issue where when using the SPA loader with Next/React, route changes that lazy loaded components wouldn't be captured. While the issue specifically called out Next/React, this should apply to Nuxt/Vue and Angular.
Fix interactions missing API calls in Angular
Fixed an issue where when using the SPA loader with Angular, route changes that contained API calls, via Angular resolver, wouldn't capture the xhr/fetch on the interaction. This works with eager and lazy routes in an Angular SPA.
v1223
v1223
Refactor loader architecture for improved developer experience
This architectural release simplifies file structure and refactors the way features are composed, in preparation for future developer experience improvements. These changes are not anticipated to have impact on agent behavior or functionality.
v1222
v1222
EXPERIMENTAL - Unblock instrumented pages from the back/forward cache (w/ feature flag)
An instrumented page's back-forward cache eligibility was hampered by the agent's unload
listener, which will be removed when a feature flag is on. With the allow_bfcache
enabled in the init
config, the agent's definition of (the end of) an user's session is more refined, and it will no longer be blocking the browser from utilizing its respective b/f cache.
Prevent feature from collecting and harvesting future data if account entitlements are invalid
The agent will now attempt to shut down an initialized feature if account entitlements are invalid. Accounts that lack entitlements to use certain endpoints will see many 403 errors in the console without this behavior. This behavior requires the Page View Event feature to be enabled.
Do not collect XHR events for data URLs
AJAX events for data URLs have not historically been collected due to errors in the agent when handling URLs without hostnames. Going forward, XHR calls to data URLs will not cause agent errors and will continue to be excluded from collection.
Reduce size of builds for modern browser targets
The agent is now compatible with only modern web syntax (ES6+); this reduces loader size for these browsers by 20% or more. We target and test support for just the last ten versions of Chrome, Edge, Safari, and Firefox -- see browser agent EOL policy for more details.
Fix nrWrapper exclusion in error stack traces
Restoring previous functionality whereby the nrWrapper
agent method should be excluded from JavaScript error stack traces.
Fix errors with global self redefinition
Fixing an issue where external code redefining the self
global variable causes the agent async loading to fail and the agent to crash.
Fix check for sessionStorage object
Ensure the agent does not crash when sessionStorage is not available or when the quota has been exceeded or set to 0. Safari has been known to set the sessionStorage quota to 0 in private browsing windows.
v1221
v1221
Add infrastructure to run on web workers
The agent's infrastructure will now allow for the agent to be built to run on web workers for future projects.
Expose webpack library as output type "self" vs. "umd"
To address "mismatched anonymous define" errors thrown by RequireJS, the agent's webpack library output will no longer include UMD checks for CommonJS and AMD module environments, and will instead be exposed globally via self
.
Fix custom attribute handling in cases where the info block is loaded after initialization
Fixed an issue where custom attributes could be cleared and reset if the info block was included on the page below the loader script. Our guidance still remains that all configurations should be included on the page above the loader code, however this is an attempt to do no harm when feasible for backwards compatibility.
Update JS error bucketing algorithm
The Agent will now take into account the error object type, message, and original stack trace when deciding on whether multiple JS errors should be bucketed together.
Fix initial page load interaction reporting with Nuxt
Fixed an issue where when using the SPA loader with Nuxt, the initial page load interaction was never being completed. This resulted in events like errors being retained in memory and never harvested because they were tied to an incomplete interaction.
Fix error with jsPDF library and SPA agent
Fixed an issue with the jsPDF library where it was not correctly detecting browser native support for Promises due to our wrapper. This resulted in an exception and jsPDF not generating the PDF. This issue is not present with the pro or lite agent.
Note: This issue does not affect the pro or lite agent. This change allows the jsPDF library to function correctly when the spa agent is used. However, it does cause an internal error within the agent to be generated. This error does not break the agent, jsPDF, or other functionality. The issue is planned to be addressed in a future update.
v1220
v1220
Capture unhandled Promise rejections
The Agent will now observes and captures unhandled Promise rejections as JavaScript Error objects.
Remove non-ASCII characters from builds
Certain dependencies were appending non-ASCII characters to build files. These characters were affecting older Python agent implementations downstream that worked to parse and encode the agent snippet. The build files are now checked and cleaned of non-ASCII characters before shipping.
Removed 3rd Party Cookies
The browser agent no longer uses 3rd party cookies to maintain and track session information. 1st party implementation using window.sessionStorage
is now used, which is automatically cleared when a page session ends. This is still managed using the privacy settings form in your browser application settings.
LCP is no longer reported on initially hidden pages
LCP metrics are no longer reported on pages whose state is hidden at load time, such as tabs refreshing in the background of a focused tab.
Async Module Loading
Individual features of the browser agent can now be dynamically loaded, enabled, or disabled at runtime.
Removal of script tag injection
The agent no longer inserts other features into the page via a script tag insertion. It now uses network requests to instantiate other code modules.
Updated test process
In an effort to better support the majority of our traffic, the test suite required to merge PRs has been updated to run against the latest 10 major versions of Chrome, Firefox, Edge, Android, and the latest 5 major versions of Safari and iOS. As part of this process, outdated code and polyfill libraries aimed at supporting deprecated browsers are no longer included in production builds by default.
Fixed issue with BrowserInteraction nodes generating circular references
BrowserInteractions no longer generate circular trees when they are self referential