통사론
newrelic.interaction().ignore()다른 SPA save() 호출을 재정의합니다. 상호 작용을 무시하므로 New Relic에 저장되거나 전송되지 않습니다.
요구 사항
브라우저 Pro+SPA 에이전트(v963 이상)
npm을 통해 수분 에이전트를 설치하고 선택한 기능으로 사용자 정의 에이전트를 구축하는 경우,
Agent를 생성할 때spa기능을 활성화해야 합니다.features에 다음을 추가하세요.import { Spa } from '@newrelic/browser-agent/features/spa';const options = {info: { ... },loader_config: { ... },init: { ... },features: [Spa]}자세한 내용은 npm 브라우저 설치 설명서를 참조하세요.
설명
이 SPA 방법을 사용하면 상호 작용이 무시됩니다. New Relic에 저장되거나 전송되지 않습니다. 이 메서드는 save() 에 대한 이전 또는 이후의 호출을 재정의합니다.
반환 값
이 메서드는 interaction() 에서 생성한 것과 동일한 API 객체를 반환합니다.
예
router.addRoute('/uninteresting-route', () => { newrelic.interaction() // Get handle to current interaction. .ignore(); // Ignore this interaction to ensure it will not be saved, even if it has fulfilled the default heuristic that makes it valid. renderUninterestingRoute(); // Render route.});