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:
Brendan O'Handley 2025-09-10 11:18:13 -05:00 committed by GitHub
parent ddbc5bce4f
commit adac9fbe71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 1 additions and 63 deletions

View File

@ -344,7 +344,6 @@ datasources:
query: 'sum(rate({$$__tags}[5m]))'
serviceMap:
datasourceUid: 'gdev-prometheus'
histogramType: 'both' # 'classic' or 'native' or 'both'
- name: gdev-pyroscope
type: grafana-pyroscope-datasource

View File

@ -218,4 +218,3 @@ datasources:
query: 'sum(rate({$$__tags}[5m]))'
serviceMap:
datasourceUid: 'gdev-prometheus'
histogramType: 'both' # 'classic' or 'native' or 'both'

View File

@ -4,7 +4,7 @@ import {
updateDatasourcePluginJsonDataOption,
} from '@grafana/data';
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';
@ -15,47 +15,6 @@ interface Props extends DataSourcePluginOptionsEditorProps<TempoJsonData> {}
export function ServiceGraphSettings({ options, onOptionsChange }: Props) {
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 (
<div className={styles.container}>
<InlineFieldRow className={styles.row}>
@ -93,23 +52,6 @@ export function ServiceGraphSettings({ options, onOptionsChange }: Props) {
</Button>
) : null}
</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>
);
}

View File

@ -114,7 +114,6 @@ export class TempoDatasource extends DataSourceWithBackend<TempoQuery, TempoJson
tracesToLogs?: TraceToLogsOptions;
serviceMap?: {
datasourceUid?: string;
histogramType?: 'classic' | 'native' | 'both';
};
search?: {
hide?: boolean;

View File

@ -7,7 +7,6 @@ export interface TempoJsonData extends DataSourceJsonData {
tracesToLogs?: TraceToLogsOptions;
serviceMap?: {
datasourceUid?: string;
histogramType?: 'classic' | 'native' | 'both';
};
search?: {
hide?: boolean;