リソース アセットは、すべての主要なbrowserによってネイティブにレポートされ、Web ページがインポートするアセットのパフォーマンスを観察およびレポートできます。 New Relic Browser はこれらのアセットをBrowserPerformance
イベントとして自動的に追跡できます。
重要
この機能はパブリックプレビュー段階であり、変更される可能性があります。この機能は注意して使用してください。パブリック プレビュー機能は、コピー アンド ペーストまたはエージェントの NPM 実装による手動のオプトインでのみ使用できます。APM が挿入されたアプリケーションにアクセスするには、サポート担当者に連絡してください。オプトインの詳細については、パブリック プレビュー機能を参照してください。
ブラウザエージェントによって検出されたページ リソースは、 BrowserPerformance
イベント タイプを通じてクエリ可能になります。 このデータを使用して、 New Relicでカスタムクエリとダッシュボードを作成できます。
パフォーマンスの詳細を調べる
ページ リソースのタイミング データを表示するためのクエリの例:
FROM BrowserPerformance SELECT * WHERE appName = 'My Application' AND entryType = '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)