Enabling New Relic's logs in context correlates your log data with data collected from our APM and infrastructure agents, as well as services instrumented with OpenTelemetry. This means that you'll see logs data or links to log data in other UI experiences, such as APM, infrastructure monitoring, distributed tracing, and errors inbox. You can use that log data to dig deeper into the performance of your app or host, without needing to manually search through log data.
To see how logs in context can help you find the root cause of an issue in your apps and hosts, watch this short video (approx. 3:40 minutes):
By bringing all of your application and infrastructure data together in a single solution, you can get to the root cause of issues faster. Logs in context help you quickly see meaningful patterns and trends.
Don't spend extra time trying to narrow down all your logs from different parts of your platform. Instead, enable logs in context to see the exact log lines you need to identify and resolve a problem.
Our latest APM agents support automatically adding context and forwarding logs without the need to install or maintain third-party software! Your logs will automatically include attributes such as
entity.name, and more. This metadata links your logs to traces, spans, infrastructure data, and other telemetry, making it easier to troubleshoot. For more information, see our APM logs in context documentation.
Drill down into your logs, traces, and errors, all from the APM Summary page in New Relic.
For details on the agent versions that support logs-in-context and log forwarding, and links to docs to help you configure that, see APM logs in context.
To learn about getting logs from services instrumented with OpenTelemetry into New Relic, see OpenTelemetry logs: Best practices.
To use our manual solution to set up logs in context for APM and for infrastructure monitoring, follow these steps.
Make sure log forwarding is enabled in New Relic. For our manual installation process, this includes configuring a supported log forwarder that collects your application logs and extends the metadata that is forwarded to New Relic. Recommendation: Use our infrastructure monitoring agent to easily get both your app's logging data and your host's logging data into New Relic.
Update to the supported APM agent version for your app, and enable distributed tracing. For specific instructions, select your agent:
See your logs data in context with your apps and hosts in the New Relic UI.
Did this doc help with your installation?
If our logging solutions don't meet your needs, you can use other options to send your log data to New Relic:
- Logging extensions via agent API calls
- HTTP endpoint via our Log API
- Syslog protocols via TCP endpoint (useful for CDNs, hardware devices, or managed services)
After you set up logs in context for APM or infrastructuring monitoring, make the most of your logging data in the New Relic UI:
- Explore the logging data across your platform with our Logs UI.
- See your logs in context of your app's performance in the APM UI. Troubleshoot errors with distributed tracing, stack traces, application logs, and more.
- Get deeper visibility into both your application and your platform performance data by forwarding your logs with our infrastructure monitoring agent. Review your infrastructure logs in the UI.
- Set up alerts.
- Query your data and create dashboards.