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.
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).
- Go to one.newrelic.com > Logs.
- Enter a query to focus on the type of log info you need, then click Query logs.
- Click the log line you want to examine in more detail.
- From the attributes list, click the Show surrounding logs icon.
Your selected (highlighted) log line is fixed so that you can still see it while you scroll the surrounding logs. To change the selected log, do any of the following:
- Click the Hide surrounding logs icon.
- Select another log line.
- Run a different query.