사용자의 편의를 위해 제공되는 기계 번역입니다.

영문본과 번역본이 일치하지 않는 경우 영문본이 우선합니다. 보다 자세한 내용은 이 페이지를 방문하시기 바랍니다.

문제 신고

end (SPA API)

통사론

newrelic.interaction().end()

현재 시간에서 SPA 상호 작용을 종료합니다.

요구 사항

  • 브라우저 Pro+SPA 에이전트(v963 이상)

  • npm을 사용하여 브라우저 에이전트를 설치하는 경우 BrowserAgent 클래스를 인스턴스화할 때 spa 기능을 활성화해야 합니다. features 배열에 다음을 추가합니다.

    import { Spa } from '@newrelic/browser-agent/features/spa';
    const options = {
    info: { ... },
    loader_config: { ... },
    init: { ... },
    features: [
    Spa
    ]
    }

    자세한 내용은 npm 브라우저 설치 설명서를 참조하세요.

설명

이 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
});
});