Discover the top benefits of observability
See the research
APM

View logs in context of APM data without any manual configuration

With your next APM agent upgrade, view application logs in context of APM metrics with granular configurations tailored for your billing and security needs. Opt out anytime.

Published 4 min read

Accessing application logs in the context of APM metrics has consistently been one of our most requested capabilities because it’s critical for efficiently troubleshooting performance issues. However, until now, developers have had to manually request access to specific hosts and configure non-standard log forwarding to collect application logs separate from their APM metrics, traces, and events.

To address this developer pain point, when you update to our newest Java, .NET,Ruby, Python, and Node.js APM language agents, you will automatically start collecting logs without the need to set up or configure anything. You get granular configurations tailored for your billing and security needs and the option to opt-out anytime.

When you update your agent, you get these three key benefits

  • Eliminate manual log configuration and maintenance necessary to collect and forward logs to New Relic without a dedicated log forwarder or lengthy manual configurations
  • Minimize context-switching by viewing application logs in context with APM metrics, traces, and events.
  • Troubleshoot issues faster by accessing logs inside the APM with enhanced UI that surface the logs you need alongside other relevant telemetry data.

When collecting logs, it is critical to ensure security, compliance, and control. This is why we are including robust support for the following: 

  • Opt-out anytime: Turn off automatic forwarding at any point by configuring your agent or using New Relic’s data management hub
  • Ingest control: Use in-agent log sampling to manage ingested volume and avoid duplicating ingest and get 3X more value than alternate log management solutions. 
  • Compliance: Log collection is disabled by default for HIPAA, PCI-enabled accounts, and accounts where High Security Mode is in use, even after you upgrade the agent. 
  • Data security: Mask, obfuscate, and prevent sending PII, PHI, or any other sensitive data via customizable security configurations

Note: Application logs in APM are only available after an APM agent update. Until you upgrade, you won't see changes in your account.

Automatic logs in context help you troubleshoot applications faster.

Let’s find out more about these new features.

Collecting logs via the APM agent

Logs are an integral part of troubleshooting application performance and health, but collecting application logs is a complex and often frustrating experience that requires domain expertise and access to your underlying environment.

Now, when you upgrade your APM agents (for supported application languages), they will automatically collect and forward logs to New Relic by default, without the need to set up or configure anything. No more need for container sidecars or third-party applications1. In a single deployment, users can automatically monitor both applications and logs.

Not every language or logging framework is currently supported. The APM agents for the languages listed here now support automatic logs in context, with more available soon:

Java .NET Ruby Python Node.js
Java
  • Log4j2
  • Logback
.NET
  • Log4net
  • Serilog
  • Microsoft.Extensions.Logging
Ruby
  • Ruby standard library logger
Python
  • Python standard library logger
Node.js
  • Node.js standard library logger

Learn more about the APM agent log configuration.

View application logs in context

Logs are better with context. By adding metadata to your logs, New Relic provides context that links your telemetry event types and entities—like APM—across our platform. Having application context in a log means that you can see all logs related to an application in a single view. You can troubleshoot and analyze your data without the need to switch between screens or tools.

Hosts (infrastructure) view experience now links to available logs.

Enhanced UI provides logs where you need them

We’ve improved our user interface to surface the logs you need alongside other relevant telemetry data. You get detailed logs across the New Relic platform, including errors inbox, application traces, and more. By combining APM and log data seamlessly, it's easier than ever to troubleshoot and identify the root cause of issues.

Updated errors inbox gives you access to the log data for each error instance.

Ensuring data privacy by managing your logs

Data collection always carries the risk of inadvertent sensitive data disclosure. Logs can contain sensitive data that should not leave your environment, regardless of how you’re sending those logs.  You always have direct control over your systems and which data you send to New Relic. Be sure to follow your organization's security guidelines to mask, obfuscate, or prevent sending PII, PHI, or any other sensitive data.

For more information, see our security documentation for log management.

Opting out and turning automatic log forwarding off

You may not want to ingest logs based on your organization’s security guidelines or to control costs. You can turn off logs by configuring your agent config file locally, or you can disable it at the account level in New Relic’s data management hub.

APM agent log ingestion is disabled by default at the account level for HIPAA, PCI-enabled accounts, and accounts where High Security Mode is in use, even after you upgrade the agent.

You can also enable log ingest from APM agents at any time by using the self-service toggle in the New Relic data management UI. Learn more about how to toggle log ingestion on or off.

Third-party log forwarders might be required in special circumstances.