Loki: Hide __aggregated_metric__ label (#103233)

This commit is contained in:
Sven Grossmann
2025-04-02 11:01:48 +02:00
committed by GitHub
parent 34192e3ad0
commit d6b71f171d
2 changed files with 8 additions and 2 deletions
@@ -566,7 +566,13 @@ describe('Language completion provider', () => {
});
it('should filter internal labels', async () => {
const datasourceWithLabels = setup({ foo: [], bar: [], __name__: [], __stream_shard__: [] });
const datasourceWithLabels = setup({
foo: [],
bar: [],
__name__: [],
__stream_shard__: [],
__aggregated_metric__: [],
});
const instance = new LanguageProvider(datasourceWithLabels);
const labels = await instance.fetchLabels();
@@ -17,7 +17,7 @@ import { DetectedFieldsResult, LabelType, LokiQuery, LokiQueryType, ParserAndLab
const NS_IN_MS = 1000000;
const EMPTY_SELECTOR = '{}';
const HIDDEN_LABELS = ['__aggregrated_metric__', '__tenant_id__', '__stream_shard__'];
const HIDDEN_LABELS = ['__aggregated_metric__', '__tenant_id__', '__stream_shard__'];
export default class LokiLanguageProvider extends LanguageProvider {
labelKeys: string[];