diff --git a/public/app/plugins/datasource/loki/LanguageProvider.test.ts b/public/app/plugins/datasource/loki/LanguageProvider.test.ts index f62277ca30d..6a888eedec2 100644 --- a/public/app/plugins/datasource/loki/LanguageProvider.test.ts +++ b/public/app/plugins/datasource/loki/LanguageProvider.test.ts @@ -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(); diff --git a/public/app/plugins/datasource/loki/LanguageProvider.ts b/public/app/plugins/datasource/loki/LanguageProvider.ts index 1982ec65e36..d6bae1ea6d1 100644 --- a/public/app/plugins/datasource/loki/LanguageProvider.ts +++ b/public/app/plugins/datasource/loki/LanguageProvider.ts @@ -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[];