Explore rewrite (#30804)

* Created new topic on tracing capability and began breaking down and re-org.

* This commit fixed a bunch of broken relrefs along with other changes.

* More changes.

* Checkin changes.

* Check in changes.

* More changes.

* More changes.

* Updated file path.

* Updated image path and more content reorg.

* Update docs/sources/explore/_index.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Adding suugestions from review.

* Some more changes from review.

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
This commit is contained in:
achatterjee-grafana
2021-02-02 12:04:00 -05:00
committed by GitHub
parent 0427df8f60
commit 58ce62912c
20 changed files with 378 additions and 359 deletions

View File

@@ -4,7 +4,7 @@ title = "Add support for Explore queries"
# Add support for Explore queries
This guide explains how to improve support for [Explore]({{< relref "../../explore/index.md" >}}) to an existing data source plugin.
This guide explains how to improve support for [Explore]({{< relref "../../explore/_index.md" >}}) to an existing data source plugin.
This guide assumes that you're already familiar with how to [Build a data source plugin]({{< relref "/tutorials/build-a-data-source-plugin.md" >}}).

View File

@@ -41,7 +41,7 @@ Grafana's backend plugin system exposes a couple of different capabilities, or b
### Query data
The query data capability allows a backend plugin to handle data source queries that are submitted from a [dashboard]({{< relref "../../../dashboards/_index.md" >}}), [Explore]({{< relref "../../../explore/index.md" >}}) or [Grafana Alerting]({{< relref "../../../alerting" >}}). The response contains [data frames]({{< relref "../data-frames.md" >}}), which are used to visualize metrics, logs, and traces. The query data capability is required to implement for a backend data source plugin.
The query data capability allows a backend plugin to handle data source queries that are submitted from a [dashboard]({{< relref "../../../dashboards/_index.md" >}}), [Explore]({{< relref "../../../explore/_index.md" >}}) or [Grafana Alerting]({{< relref "../../../alerting" >}}). The response contains [data frames]({{< relref "../data-frames.md" >}}), which are used to visualize metrics, logs, and traces. The query data capability is required to implement for a backend data source plugin.
### Resources

View File

@@ -46,7 +46,7 @@ frame.add({ time: 1589189388597, content: 'user registered' });
frame.add({ time: 1589189406480, content: 'user logged in' });
```
That's all you need to start returning log data from your data source. Go ahead and try it out in [Explore]({{< relref "../../explore/index.md" >}}) or by adding a [Logs panel]({{< relref "../../panels/visualizations/logs-panel.md" >}}).
That's all you need to start returning log data from your data source. Go ahead and try it out in [Explore]({{< relref "../../explore/_index.md" >}}) or by adding a [Logs panel]({{< relref "../../panels/visualizations/logs-panel.md" >}}).
Congratulations, you just wrote your first logs data source plugin! Next, let's look at a couple of features that can further improve the experience for the user.
@@ -75,7 +75,7 @@ frame.add({ time: 1589189406480, content: 'user logged in' });
You can add additional information about each log line by adding more data frame fields.
If a data frame has more than one text field, then Grafana assumes the first field in the data frame to be the actual log line. Any subsequent text fields are treated as [detected fields]({{< relref "../../explore/index.md#labels-and-detected-fields" >}}).
If a data frame has more than one text field, then Grafana assumes the first field in the data frame to be the actual log line. Any subsequent text fields are treated as [detected fields]({{< relref "../../explore/_index.md#labels-and-detected-fields" >}}).
While you can add any number of custom fields to your data frame, Grafana comes with a couple of dedicated fields: `levels` and `id`. Let's have a closer look at each one.