Combined with New Relic Logs, logs-in-context for the Java agent connects your Logs and APM data in New Relic, giving full context to high-level events and providing high value data to specific log lines. This document explains how to enable this feature and get started using it.
New Relic's logs-in-context (linking logs directly to Applications, APM errors, and APM traces and spans) for New Relic Logs is currently available as a beta feature. Your use of the early access service is at your own risk. New Relic disclaims all warranties, express or implied, regarding the beta services.
Compatibility and requirements
To use New Relic Logs with the Java agent, ensure your configuration meets the following requirements:
- Logs-in-context feature flags enabled.
- New Relic license key
- New Relic Insights Insert key
- New Relic Logs enabled, with a compatible log forwarder installed
- Java agent 5.6.0 or higher: Install or update
- Distributed tracing enabled
Enable logs-in-context for Java
Before enabling logs-in-context, you must have the appropriate feature flags. To be added, please contact email@example.com.
Choose a extension to see specific instructions:
- Dropwizard v1.3 extension
- java.util.logging extension
- Logback extension
- Log4j 1.x extension
- Log4j 2.x extension
Now that you've enabled logs-in-context, here are some potential next steps:
- Explore your data using the Logs UI.
- Troubleshoot errors with distributed tracing, stack traces, application logs, and more.
- Query your data in Insights and create custom dashboards, charts, or alerts.