Log (audit) all data your New Relic agent transmits

Every New Relic agent includes strong safeguards to ensure data security. For example, New Relic automatically encrypts sensitive information before it is transmitted. For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website.

If you need to record and view information about all data your app transmits to New Relic, you can enable audit logging for short periods of time. This is useful, for example, with debugging or auditing, when you need detailed information about what exactly is being transmitted.

Be sure to disable audit logging as soon as you are finished using it. This feature causes additional overhead, which may overload the audit log file if left turned on for extended periods of time.

APM agent-specific audit logging

For details about the audit logging options for your APM agent's configuration file, see the agent-specific documentation:

Agent Configuration file
C SDK

When starting the C SDK daemon, add -auditlog <file> to the daemon configuration file. For example:

./newrelic-daemon -f -logfile stdout -loglevel debug -auditlog audit.log
Go Logging is optional with the Go agent. If you are using newrelic.NewLogger(w) and want more detailed output, change newrelic.NewLogger(w) to newrelic.NewDebugLogger(w). For more information, see the New Relic Go logging documentation on GitHub.
Java Set audit_mode to true.
.NET Set auditLog to true.
Node.js New Relic's Node.js agent does not use separate audit logs because the payload is already available in the configuration logs. To view increasing levels of detail, use your config file's logging level variables.
PHP Use PHP newrelic.daemon.auditlog (for newrelic.ini) or auditlog (for newrelic.cfg).
Python Use Python audit_log_file values.
Ruby Use audit_log values. For more information, see Ruby agent audit log.

Infrastructure agent logging

You can generate Infrastructure logs for troubleshooting your New Relic Infrastructure agent.

Account logging

To audit changes to your New Relic account, run NRQL queries with NrAuditEvent in New Relic Insights. To customize your query, use any of the available NrAuditEvent attributes.

For more help

Recommendations for learning more: