Configure the Ruby agent's AI monitoring settings to enable LLM instrumentation and control whether input and output content is captured in AI events.
AI Monitoring
This section includes Ruby agent configurations for setting up AI monitoring.
Importante
You need to enable distributed tracing to capture trace and feedback data. It is turned on by default in Ruby agents 8.0.0 and higher.
Type
Boolean
Default
false
Environ variable
NEW_RELIC_AI_MONITORING_ENABLED
If false, all LLM instrumentation (OpenAI only for now) will be disabled and no metrics, events, or spans will be sent. AI Monitoring is automatically disabled if high_security mode is enabled.
Type
Boolean
Default
true
Environ variable
NEW_RELIC_AI_MONITORING_RECORD_CONTENT_ENABLED
If false, LLM instrumentation (OpenAI only for now) will not capture the content attribute on LlmChatCompletionMessage events or the input attribute on LlmEmbedding events. This is an optional security setting to prevent recording sensitive data sent to and received from your LLMs.