Docs: Sync latest master docs with 7.5.x (#33156)

* Docs: Sync latest master docs with 7.5.x

* remove some remaining next aliases and links

* Docs: Removed v8 doc changes

* fixed merge issue
This commit is contained in:
Torkel Ödegaard
2021-04-22 07:32:32 +02:00
committed by GitHub
parent 5ee4c694ea
commit ceeb381eae
86 changed files with 1928 additions and 502 deletions
@@ -14,6 +14,7 @@ To add logs support to an existing data source, you need to:
- Enable logs support
- Construct the log data
- (Optional) Add preferred visualisation type hint to the data frame
### Enable logs support
@@ -50,6 +51,25 @@ That's all you need to start returning log data from your data source. Go ahead
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.
### (Optional) Add preferred visualisation type hint to the data frame
To make sure Grafana recognizes data as logs and shows logs visualization automatically in Explore you have do set `meta.preferredVisualisationType` to `'logs'` in the returned data frame. See [Selecting preferred visualisation section]({{< relref "add-support-for-explore-queries.md#selecting-preferred-visualisation" >}})
**Example:**
```ts
const frame = new MutableDataFrame({
refId: query.refId,
meta: {
preferredVisualisationType: 'logs',
},
fields: [
{ name: 'time', type: FieldType.time },
{ name: 'content', type: FieldType.string },
],
});
```
## Add labels to your logs
To help filter log lines, many log systems let you query logs based on metadata, or _labels_.