Resource Assets are reported natively by all major browser and allows you to observe and report on the performance of the assets your webpages import. New Relic Browser can automatically track these assets as BrowserPerformance
events.
Important
This feature is currently experimental and available only for opt-in on manual copy and paste, or NPM implementations of the agent. For more information on opting in, refer experimental features. Note that these features are subject to changes before GA.
Page resources detected by the browser agent will be queryable through the BrowserPerformance
event type. You can use this data to create custom queries and dashboards in New Relic One.
Examine performance details
Example queries to view page resource timing data:
FROM BrowserPerformance SELECT * WHERE appName = 'My Application' AND entryName = 'resource'
FROM BrowserPerformance SELECT average(entryDuration) as 'ms' WHERE entryType = 'resource' facet initiatorType
FROM BrowserPerformance SELECT average(connectEnd - connectStart) as 'TCP Handshake', average(domainLookupEnd - domainLookupStart) as 'DNS Lookup', average(redirectEnd - redirectStart) as 'Redirection Time', average(responseStart - requestStart) as 'Request Time' timeseries 3 minutes
FROM BrowserPerformance SELECT percentage(count(*), where decodedBodySize <= encodedBodySize) as 'Compressed Payloads' where entryType = 'resource'
FROM BrowserPerformance SELECT percentage(count(*), where transferSize = 0) as 'Cached Payloads' where entryType = 'resource'
FROM BrowserPerformance SELECT percentage(count(*), where renderBlockingStatus is NOT NULL ) as 'Render Blocking Resources' where entryType = 'resource'
FROM BrowserPerformance SELECT max(responseStart - requestStart) as 'Request Time' facet entryName
FROM BrowserPerformance SELECT max(domainLookupEnd - domainLookupStart) as 'DNS Lookup Time' facet entryName
FROM BrowserPerformance SELECT max(responseStart - requestStart) as 'Request Time' facet currentUrl
FROM BrowserPerformance SELECT max(connectEnd - connectStart) as 'TCP Handshake Time' facet entryName
FROM BrowserPerformance SELECT count(*) where firstParty is true facet initiatorType limit 100
FROM BrowserPerformance SELECT count(*) facet cases(where firstParty is true as 'First Party Asset')
FROM BrowserPerformance SELECT average(entryDuration) facet cases(where firstParty is true as 'First Party Asset', where 1=1 as Other)