如何以角度设置newrelic?

问题描述

我正在尝试使用 angular6 在我的应用程序中设置 newrelic,但出现以下错误

“找不到名称‘newrelic’”。 我将 newrelic js 文件包含到 index.html 中,并在 app.component.ts 文件调用了 'newrelic.setCustomAttribute('useId',this.userId)

它无法在 angular 中识别 newrelic。请帮助我在哪里可以包含此 newrelic 文件或设置步骤

解决方法

试着遵循这个:
https://docs.newrelic.com/docs/agents/nodejs-agent/installation-configuration/install-nodejs-agent/

下面还有关于兼容性的所有信息。 https://docs.newrelic.com/docs/agents/nodejs-agent/getting-started/compatibility-requirements-nodejs-agent/