重要
この API を使用するには、ブラウザ エージェントの Browser Pro+SPA エディションが必要です。
構文
newrelic.interaction().end()
現在の時刻でのSPAインタラクションを終了します。
要件
エージェントのバージョン nr-963 以上。
説明
この SPA メソッドは、現在の時点でのブラウザとの対話を終了します。それ以降のコールバックやリクエストは、SPA インタラクションの一部としては含まれません。
戻り値
このメソッドは、 interaction()
によって作成されたものと同じAPIオブジェクトを返します。
例
router.addRoute('/profile', () => { startSlowBackgroundAjax(); // Start work that will continue past the end of the interaction renderProfileComponents().then(() => { // Do work that is part of the interaction newrelic.interaction().end(); // End the interaction once the important components an the page have finished rendering });});