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.
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.