Tempo: Add cheat sheet to query editor (#33272)

This commit is contained in:
Zoltán Bedi 2021-04-23 09:23:33 +02:00 committed by GitHub
parent 7499efeef8
commit 340942267c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,20 @@
import React from 'react';
export default function CheatSheet() {
return (
<div>
<h2 id="tempo-cheat-sheet">Tempo Cheat Sheet</h2>
<p>
Tempo is a trace id lookup store. Enter a trace id in the above field and hit Run Query to retrieve your
trace. Tempo is generally paired with other datasources such as Loki or Prometheus to find traces.
</p>
<p>
Here are some{' '}
<a href="https://grafana.com/docs/tempo/latest/guides/instrumentation/" target="blank">
instrumentation examples
</a>{' '}
to get you started with trace discovery through logs and metrics (exemplars).
</p>
</div>
);
}

View File

@ -1,8 +1,10 @@
import { DataSourcePlugin } from '@grafana/data';
import CheatSheet from './CheatSheet';
import { ConfigEditor } from './ConfigEditor';
import { TempoDatasource } from './datasource';
import { TempoQueryField } from './QueryField';
import { ConfigEditor } from './ConfigEditor';
export const plugin = new DataSourcePlugin(TempoDatasource)
.setConfigEditor(ConfigEditor)
.setQueryEditorHelp(CheatSheet)
.setExploreQueryField(TempoQueryField);