• EnglishEspañol日本語한국어Português
  • Log inStart now

Find an issue's cause or impact with surrounding logs

Problem

You want to see what led up to an issue so you can identify its root cause. Or, you want to see what followed an event so you can assess its impact. But when you query for the log line or lines you're interested in, all non-matching lines are filtered out.

Solution

Often the lines that come before or after the log data that you queried can help you understand the context of the queried lines. By default, New Relic shows 30 minutes of logs surrounding your query (up to 15 minutes before and 15 minutes after the selected log).

To get more logs more directly related to the issue:

  1. Go to one.newrelic.com > Logs.
  2. Enter a query to focus on the type of log info you need, then click Query logs.
  3. Click the log line you want to examine in more detail.
  4. From the log details pane, click on the attribute of your choice, then click Show surrounding logs.

Any logs that match that attribute's value will appear as a surrounding log. Your selected (highlighted) log line is fixed so that you can still see it while you scroll the surrounding logs. The UI also automatically replaces your query for the selected attribute.

To change the selected log, do any of the following:

  • Select another log line.
  • Run a different query.
Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.