diff --git a/public/app/plugins/datasource/tempo/datasource.ts b/public/app/plugins/datasource/tempo/datasource.ts index 508f4b043a6..63cb1bba4ea 100644 --- a/public/app/plugins/datasource/tempo/datasource.ts +++ b/public/app/plugins/datasource/tempo/datasource.ts @@ -240,7 +240,7 @@ export class TempoDatasource extends DataSourceWithBackend): Promise> { - await this.languageProvider.fetchTags(this.timeRangeForTags, options.timeRange); + await this.languageProvider.fetchTags(this.timeRangeForTags, options?.timeRange ?? undefined); const tags = this.languageProvider.tagsV2 || []; return tags .map(({ name, tags }) => @@ -253,7 +253,7 @@ export class TempoDatasource extends DataSourceWithBackend): Promise> { const query = this.languageProvider.generateQueryFromFilters({ adhocFilters: options.filters }); - return this.tagValuesQuery(options.key, query, options.timeRange); + return this.tagValuesQuery(options.key, query, options?.timeRange ?? undefined); } async tagValuesQuery(tag: string, query: string, range?: TimeRange): Promise> {