diff --git a/public/app/plugins/datasource/loki/datasource.test.ts b/public/app/plugins/datasource/loki/datasource.test.ts index 7fb44ddaf39..dfe34851ad9 100644 --- a/public/app/plugins/datasource/loki/datasource.test.ts +++ b/public/app/plugins/datasource/loki/datasource.test.ts @@ -1529,6 +1529,7 @@ describe('LokiDatasource', () => { queryType: 'range', refId: 'log-sample-A', maxLines: 20, + supportingQueryType: SupportingQueryType.LogsSample, }); }); @@ -1547,6 +1548,7 @@ describe('LokiDatasource', () => { queryType: LokiQueryType.Range, refId: 'log-sample-A', maxLines: 20, + supportingQueryType: SupportingQueryType.LogsSample, }); }); @@ -1564,6 +1566,7 @@ describe('LokiDatasource', () => { expr: '{label="value"}', queryType: LokiQueryType.Range, refId: 'log-sample-A', + supportingQueryType: SupportingQueryType.LogsSample, maxLines: 5, }); }); diff --git a/public/app/plugins/datasource/loki/datasource.ts b/public/app/plugins/datasource/loki/datasource.ts index 80a95dda5a5..de497360aa1 100644 --- a/public/app/plugins/datasource/loki/datasource.ts +++ b/public/app/plugins/datasource/loki/datasource.ts @@ -242,6 +242,7 @@ export class LokiDatasource refId: `${REF_ID_STARTER_LOG_SAMPLE}${normalizedQuery.refId}`, expr: getLogQueryFromMetricsQuery(expr), maxLines: Number.isNaN(Number(options.limit)) ? this.maxLines : Number(options.limit), + supportingQueryType: SupportingQueryType.LogsSample, }; default: