Skip to content

Commit

Permalink
Merge pull request #16420 from planteater/feature/showsurrounding
Browse files Browse the repository at this point in the history
Add info on Show Surrounding Logs
  • Loading branch information
bradleycamacho committed Mar 8, 2024
2 parents 8a9afc1 + 3de6e5f commit 3b6dd46
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/content/docs/codestream/observability/log-search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
title: Log search
metaDescription: "Search logs from your IDE."
redirects:
freshnessValidatedDate: never
freshnessValidatedDate: 2024-03-05
---

import codestreamLogSearchResults from 'images/codestream_screenshot-crop_log-search-results.webp'

import codestreamLogLineSearch from 'images/codestream_screenshot-crop_log-line-search.webp'

import codestreamLogShowSurrounding from 'images/codestream_screenshot-crop_log-show-surrounding.webp'


No need to slow down your investigation by context switching between your IDE and your browser to search logs. CodeStream brings the New Relic log-search experience right into your IDE! Click on the <DoNotTranslate>**View Logs**</DoNotTranslate> entry for any service listed in the CodeStream pane, or click on the <DoNotTranslate>**View Logs**</DoNotTranslate> icon in CodeStream's global navigation.

CodeStream's log search is currently available for logs collected by a New Relic APM agent or the OTel integration.
Expand All @@ -21,6 +24,14 @@ CodeStream's log search is currently available for logs collected by a New Relic

Recent logs are displayed by default, and you have the ability to search by keyword, adjust the timeframe, or switch to a different service. Click on the carat to the left of any log entry to expand it and view the details. Hover over any value to easily copy it.

If you've narrowed down your results using a keyword search (e.g., for an error message) and now want to see a specific result in context, hover over the entry and click on the *Show Surrounding Logs* button that appears at the right. This will pin that specific result and then show the log entries that preceeded and followed it in the log file.

<img
title="Show surrounding logs"
alt="A screenshot of surrounding logs"
src={codestreamLogShowSurrounding}
/>

## Search for specific log lines [#context-menu]

You can also jump into a log search right from any log line in your code. You can select a string to search for and the select <DoNotTranslate>**Find in logs**</DoNotTranslate> from the context menu. You can also just select <DoNotTranslate>**Find in logs**</DoNotTranslate> without first selecting any text, and CodeStream will automatically extract the string from the line where the cursor is placed.
Expand Down
Binary file not shown.

0 comments on commit 3b6dd46

Please sign in to comment.