New Relic Now Demonstração de novas integrações de agentes em 24 de junho.
Garanta o seu lugar.
No momento, esta página está disponível apenas em inglês.

This is the second of our deep dives into recent New Relic Logging enhancements! We started with simplifying cloud log ingestion. Now, we're thrilled to showcase a feature that brings ultimate simplicity to an essential part of application monitoring: getting your Java application logs into New Relic and correlating them seamlessly with your APM data.

For Java developers, instrumenting applications for performance monitoring (APM) is just one part of the puzzle. To get the full picture, especially during troubleshooting, you need application logs. However, enabling log forwarding and ensuring those logs are contextualized with your APM transaction traces, distributed traces, and error often involve manual configuration changes, sifting through .yml files or Java properties, coordinating with DevOps, and potentially enduring redeployments or downtime. This friction could slow down debugging when time is of the essence.

New Relic is excited to dramatically simplify this with one-click APM log forwarding for Java applications (version 7.6.0 or higher of the Java agent). Leveraging our Server-Side Configuration (SSC) capabilities, you can now enable or disable Java application log forwarding directly within the New Relic APM UI, with no code changes or complex redeployments needed.

Imagine instantly turning on detailed application logs during an incident, directly from the UI, and having them automatically correlated with your APM traces. This feature is all about removing barriers, providing immediate control for debugging, and delivering rich "Logs in Context" to help you resolve issues faster than ever.

Get the full details on this new capability from our What's New announcement: 1-Click Log Forwarding for Java Applications.

Effortless Java Logs in Context

When an issue arises, the last thing you want is to wrestle with configuration files. Our one-click log forwarding for Java applications, powered by Server-Side Configuration, is designed to make your life easier and your troubleshooting faster.

One-Click Activation from the UI

The traditional need for manual configuration file changes (newrelic.yml, Java properties), pull requests, and redeployments just to enable or disable application log forwarding.

Gone are the days of hunting through configuration files or waiting for a deployment window. With appropriate permissions, you can now toggle Java application log forwarding on or off directly within the APM UI using Server-Side Configuration. This gives developers and on-call engineers immediate control to access logs precisely when needed, for example, during an active incident investigation, without disrupting their development cycle.

Seamless Logs in Context for Faster Root Cause Analysis

Disconnected logs and APM data requires manual correlation, which slows down the process of identifying the root cause of issues.

When enabled via the UI, logs from your Java application are automatically enriched with metadata that links them directly to your APM transaction traces, distributed traces, and transaction data. This means you can effortlessly pivot from an error trace in APM directly to the relevant logs, or see logs in the context of a specific transaction, dramatically speeding up root cause analysis and reducing context switching. 

Reduced Friction & Accelerated Debugging Cycles

Delays in development and debugging due to cumbersome and time-consuming log configuration processes.

How it improves workflow: By removing the operational hurdles to enabling application logs, we empower developers to debug more efficiently. This feature streamlines the debugging workflow, enhances agility, and directly contributes to a reduction in Mean Time To Resolution (MTTR) for application issues. You get the logs you need, when you need them, without the wait.

How to use

Enabling one-click log forwarding for your Java applications is straightforward. Here’s how you can get started using Server-Side Configuration:

Prerequisites:

  • Your application must be running the New Relic Java agent version 7.6.0 or higher.
  • Account-level logging must be enabled in New Relic.
  • You need admin privileges in New Relic to modify Server-Side Configuration.
  • This feature works by overriding local configurations set in newrelic.yml or via Java system properties. It is not compatible if you are managing these specific logging configurations via environment variables.

Steps to Enable via UI:

  • Navigate to Your Java Application in APM: From the New Relic One platform, go to APM and select the Java service you want to configure.
  • Access Server-Side Configuration: In the left-hand navigation menu for your selected application, under Settings, click on Application.
  • Enable Server-Side Configuration: If not already enabled, turn on the main toggle for "Server-side agent configuration".
  • Opt-In for Log Forwarding Control: In the list of configurable settings, find "Application log forwarding". Select the radio button to indicate you want Server-Side Configuration to manage this setting.
  • Turn On Application Log Forwarding: In the dedicated "Application log forwarding" section that appears or becomes active, select the radio button to turn it ON.
  • Save Changes: Click the save button to apply your new configuration. Your Java application logs should start appearing in New Relic within a few minutes, automatically correlated with your APM data.

Important Considerations:

  • When you use Server-Side Configuration to manage log forwarding (or other settings like transaction tracing and error handling), the UI settings will override any corresponding settings in your local newrelic.yml file or Java system properties.
  • Remember, if log forwarding configurations are being set via environment variables, Server-Side Configuration for logging will not take effect.

Our series on logging enhancements at New Relic continues! So far, we've covered streamlining AWS log ingestion and simplifying Java APM log forwarding with a single click.

Stay tuned for the next post in this series, where we’ll turn our attention to a vital component in modern observability: the log forwarding agent. We will explore how New Relic helps you manage the lifecycle of Fluent Bit, the preferred open-source collector for cloud-native architectures. We'll discuss how to ensure your logging pipeline is built on a secure and flexible foundation, helping you instrument, analyze, and troubleshoot more effectively than ever before.