mirror of https://github.com/grafana/grafana.git
Tempo: Remove experimental config option to select native histograms (#110618)
* remove config option from configured data sources * remove from ServiceGraphSettings.tsx * remove config option from types
This commit is contained in:
parent
ddbc5bce4f
commit
adac9fbe71
|
@ -344,7 +344,6 @@ datasources:
|
||||||
query: 'sum(rate({$$__tags}[5m]))'
|
query: 'sum(rate({$$__tags}[5m]))'
|
||||||
serviceMap:
|
serviceMap:
|
||||||
datasourceUid: 'gdev-prometheus'
|
datasourceUid: 'gdev-prometheus'
|
||||||
histogramType: 'both' # 'classic' or 'native' or 'both'
|
|
||||||
|
|
||||||
- name: gdev-pyroscope
|
- name: gdev-pyroscope
|
||||||
type: grafana-pyroscope-datasource
|
type: grafana-pyroscope-datasource
|
||||||
|
|
|
@ -218,4 +218,3 @@ datasources:
|
||||||
query: 'sum(rate({$$__tags}[5m]))'
|
query: 'sum(rate({$$__tags}[5m]))'
|
||||||
serviceMap:
|
serviceMap:
|
||||||
datasourceUid: 'gdev-prometheus'
|
datasourceUid: 'gdev-prometheus'
|
||||||
histogramType: 'both' # 'classic' or 'native' or 'both'
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {
|
||||||
updateDatasourcePluginJsonDataOption,
|
updateDatasourcePluginJsonDataOption,
|
||||||
} from '@grafana/data';
|
} from '@grafana/data';
|
||||||
import { DataSourcePicker } from '@grafana/runtime';
|
import { DataSourcePicker } from '@grafana/runtime';
|
||||||
import { Button, InlineField, InlineFieldRow, useStyles2, Combobox, TextLink } from '@grafana/ui';
|
import { Button, InlineField, InlineFieldRow, useStyles2 } from '@grafana/ui';
|
||||||
|
|
||||||
import { TempoJsonData } from '../types';
|
import { TempoJsonData } from '../types';
|
||||||
|
|
||||||
|
@ -15,47 +15,6 @@ interface Props extends DataSourcePluginOptionsEditorProps<TempoJsonData> {}
|
||||||
export function ServiceGraphSettings({ options, onOptionsChange }: Props) {
|
export function ServiceGraphSettings({ options, onOptionsChange }: Props) {
|
||||||
const styles = useStyles2(getStyles);
|
const styles = useStyles2(getStyles);
|
||||||
|
|
||||||
const histogramOptions = [
|
|
||||||
{ label: 'Classic', value: 'classic' },
|
|
||||||
{ label: 'Native', value: 'native' },
|
|
||||||
{ label: 'Both', value: 'both' },
|
|
||||||
];
|
|
||||||
|
|
||||||
const nativeHistogramDocs = (
|
|
||||||
<>
|
|
||||||
Select which type of histograms are configured in the {metricsGeneratorDocsLink()}. If native histograms are
|
|
||||||
configured, you must also configure native histograms ingestion in {prometheusNativeHistogramsDocsLink()} or{' '}
|
|
||||||
{mimirNativeHistogramsDocsLink()}.
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
function metricsGeneratorDocsLink() {
|
|
||||||
return (
|
|
||||||
<TextLink href="https://grafana.com/docs/tempo/latest/setup-and-configuration/metrics-generator/" external>
|
|
||||||
Tempo metrics generator
|
|
||||||
</TextLink>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function prometheusNativeHistogramsDocsLink() {
|
|
||||||
return (
|
|
||||||
<TextLink href="https://prometheus.io/docs/specs/native_histograms/#native-histograms" external>
|
|
||||||
Prometheus
|
|
||||||
</TextLink>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function mimirNativeHistogramsDocsLink() {
|
|
||||||
return (
|
|
||||||
<TextLink
|
|
||||||
href="https://grafana.com/docs/mimir/latest/configure/configure-native-histograms-ingestion/#configure-native-histograms-globally"
|
|
||||||
external
|
|
||||||
>
|
|
||||||
Mimir
|
|
||||||
</TextLink>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<InlineFieldRow className={styles.row}>
|
<InlineFieldRow className={styles.row}>
|
||||||
|
@ -93,23 +52,6 @@ export function ServiceGraphSettings({ options, onOptionsChange }: Props) {
|
||||||
</Button>
|
</Button>
|
||||||
) : null}
|
) : null}
|
||||||
</InlineFieldRow>
|
</InlineFieldRow>
|
||||||
<InlineFieldRow className={styles.row}>
|
|
||||||
{/* TODO: Remove this in favor of automatic detection of native histograms https://github.com/grafana/grafana/issues/109709 */}
|
|
||||||
<InlineField tooltip={nativeHistogramDocs} label="Histogram type" labelWidth={26} interactive={true}>
|
|
||||||
<Combobox
|
|
||||||
id="histogram-type-select"
|
|
||||||
value={options.jsonData.serviceMap?.histogramType || 'classic'}
|
|
||||||
width={40}
|
|
||||||
options={histogramOptions}
|
|
||||||
onChange={(value) =>
|
|
||||||
updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'serviceMap', {
|
|
||||||
...options.jsonData.serviceMap,
|
|
||||||
histogramType: value.value,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</InlineField>
|
|
||||||
</InlineFieldRow>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,6 @@ export class TempoDatasource extends DataSourceWithBackend<TempoQuery, TempoJson
|
||||||
tracesToLogs?: TraceToLogsOptions;
|
tracesToLogs?: TraceToLogsOptions;
|
||||||
serviceMap?: {
|
serviceMap?: {
|
||||||
datasourceUid?: string;
|
datasourceUid?: string;
|
||||||
histogramType?: 'classic' | 'native' | 'both';
|
|
||||||
};
|
};
|
||||||
search?: {
|
search?: {
|
||||||
hide?: boolean;
|
hide?: boolean;
|
||||||
|
|
|
@ -7,7 +7,6 @@ export interface TempoJsonData extends DataSourceJsonData {
|
||||||
tracesToLogs?: TraceToLogsOptions;
|
tracesToLogs?: TraceToLogsOptions;
|
||||||
serviceMap?: {
|
serviceMap?: {
|
||||||
datasourceUid?: string;
|
datasourceUid?: string;
|
||||||
histogramType?: 'classic' | 'native' | 'both';
|
|
||||||
};
|
};
|
||||||
search?: {
|
search?: {
|
||||||
hide?: boolean;
|
hide?: boolean;
|
||||||
|
|
Loading…
Reference in New Issue