You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/search/copilot.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,25 +108,23 @@ Select your preferred chart type, such as **Table**, **Bar**, **Column**, or **L
108
108
109
109
#### Edit query code
110
110
111
-
Optionally, you can edit your log search query code.
111
+
You can manually edit your log search query code if needed.
112
112
113
-
1. Click in the code editor field and edit your search. Not familiar with Sumo Logic query language? See [Search Query Language](/docs/search/search-query-language) to learn more.<br/><img src={useBaseUrl('img/search/copilot/code-editor.png')} alt="Copilot time period" style={{border: '1px solid gray'}} width="500" />
114
-
<!-- These two notes conflict. I've asked for clarity.
115
-
:::note JSON formatting
116
-
If your log query contains a mix JSON and non-JSON formatting, add `{` to the source expression to trigger **Suggestions**.<br/><img src={useBaseUrl('img/search/copilot/copilot-json.png')} alt="Copilot JSON formatting" style={{border: '1px solid gray'}} width="350" />
117
-
:::
113
+
<details>
114
+
<summary>**JSON Syntax Rules**</summary>
118
115
119
-
:::warning Limitations
120
-
Copilot supports querying JSON logs only. You cannot use Copilot to query unstructured data, metrics, or traces. To get a list of `_sourceCategories` with JSON data, use the below query:
121
-
```
116
+
* Copilot supports querying JSON logs only. It cannot be used to query unstructured data, metrics, or traces. To retrieve a list of `_sourceCategories` with JSON data, use the following query:
117
+
```sql
122
118
_sourceCategory=*"{""}"
123
119
| limit10000 | logreduce keys noaggregate
124
120
| count by _sourceCategory, _schema
125
121
| where _schema !="unknown"
126
122
| sum(_count) by _sourceCategory
127
123
```
128
-
:::
129
-
-->
124
+
* If your log query contains a mix JSON and non-JSON formatting (i.e., a log file is partially JSON), you can isolate the JSON portion by adding `{` to the source expression to trigger **Suggestions**.<br/><img src={useBaseUrl('img/search/copilot/copilot-json.png')} alt="Copilot JSON formatting" style={{border: '1px solid gray'}} width="350" />
125
+
</details>
126
+
127
+
1. Click in the code editor field and edit your search. Not familiar with Sumo Logic query language? See [Search Query Language](/docs/search/search-query-language) to learn more.<br/><img src={useBaseUrl('img/search/copilot/code-editor.png')} alt="Copilot time period" style={{border: '1px solid gray'}} width="500" />
130
128
1. When you're done, press Enter or click the search button.<br/><img src={useBaseUrl('img/search/copilot/play.png')} alt="Copilot time period" style={{border: '1px solid gray'}} width="500" />
0 commit comments