This page covers the Node.js agent settings for AI monitoring, including LLM telemetry, streaming, and content recording.
Conseil
Back to the full settings index: Node.js agent configuration
AI monitoring
LLM instrumentation is enabled by default. The agent sends Llm* custom events, spans, and metrics without message content.
To opt out, set any of the following to false:
ai_monitoring.basic_telemetry.enabledinnewrelic.jsNEW_RELIC_AI_MONITORING_BASIC_TELEMETRY_ENABLEDenvironment variableai_monitoring.enabledinnewrelic.js(deprecated, but still works)NEW_RELIC_AI_MONITORING_ENABLEDenvironment variable (deprecated, but still works)
Important
You must enable distributed tracing to capture AI data. It's turned on by default in Node.js agents 8.3.0 and higher. If you've enabled high security mode, AI monitoring will not work.
Important
When enabled, AI Monitoring will record a streaming copy of inputs and outputs sent to and from the models you choose to monitor, including any personal information contained therein. When using AI Monitoring, you are responsible for obtaining consent from your model users that their interactions may be recorded by a third party (New Relic) for the purpose of providing the AI Monitoring feature.