1+++
2title = "Inspector in Explore"
3weight = 400
4+++
5
6# Inspector in Explore
7
8The inspector helps you understand and troubleshoot your queries. You can inspect the raw data, export that data to a comma-separated values (CSV) file, export log results in TXT format, and view query requests.
9
10## Inspector UI
11
12The inspector has following tabs:
13
14- **Stats tab -** Shows how long your query takes and how much it returns.
15- **Query tab -** Shows you the requests to the server sent when Grafana queries the data source.
16- **JSON tab -** Allows you to view and copy the data JSON and data frame structure JSON.
17- **Data tab -** Shows the raw data returned by the query.
18- **Error tab -** Shows the error. Only visible when query returns error.
19
20## Inspector tasks
21
22You can perform a variety of tasks in the Explore inspector.
23
24### Open the Inspector
25
261. Run the query you would like to inspect.
271. Click the **Inspector** button.
28
29The inspector pane opens on the bottom of the screen.
30
31### Inspect raw query results
32
33You can view raw query results, that is the data returned by the query in a table.
34
35In the **Inspector** tab, click the **Data** tab.
36
37For multiple queries or for queries multiple nodes, there are additional options.
38
39- **Show data frame:** Select the result set data you want to view.
40- **Series joined by time:** View the raw data from all of your queries at once, one result set per column. You can click a column heading to sort the data.
41
42### Download raw query results as CSV
43
44Grafana generates a CSV file in your default browser download location. You can open it in the viewer of your choice.
45
461. In the **Inspector** tab, raw query results following instructions in (### Inspect raw query results).
471. Refine query settings until you can see the raw data that you want to export.
481. Click **Download CSV**.
49
50In order to download a CSV file specifically formatted for Excel, expand **Data options** and then enable the **Download for Excel** toggle before you click the **Download CSV** option.
51
52### Download log results as TXT
53
54Grafana generates a TXT file in your default browser download location. You can open it in the viewer of your choice.
55
561. Open the inspector.
571. Inspect the log query results as described above.
581. Click **Download logs**.
59
60### Download trace results
61
62Based on the data source type, Grafana generates a JSON file for the trace results in one of the supported formats: Jaeger, Zipkin, or OTLP formats.
63
641. Open the inspector.
651. Inspect the trace query results [as described above](#inspect-raw-query-results).
661. Click **Download traces**.
67
68### Inspect query performance
69
70The Stats tab displays statistics that tell you how long your query takes, how many queries you send, and the number of rows returned. This information can help you troubleshoot your queries, especially if any of the numbers are unexpectedly high or low.
71
721. Open the inspector.
731. Navigate to the **Stats** tab.
74
75Statistics are displayed in read-only format.
76
77### View JSON model
78
79You can explore and export data as well as data frame JSON models.
80
811. In the Inspector panel, click the **JSON** tab.
821. From the Select source dropdown, choose one of the following options:
83   - **Data -** Displays a JSON object representing the data that was returned to Explore.
84   - **DataFrame structure -** Displays the raw result set.
851. You can expand or collapse portions of the JSON to view separate sections. You can also click the **Copy to clipboard** option to copy JSON body and paste it into another application.
86
87### View raw request and response to data source
88
891. Open the panel inspector and then click the **Query** tab.
901. Click **Refresh**.
91
92Grafana sends the query to the server and displays the result. You can drill down on specific portions of the query, expand or collapse all of it, or copy the data to the clipboard to use in other applications.
93