Commit c7e007d1 by Giordano Ricci Committed by GitHub

Elasticsearch: fix log row context erroring out (#31088)

parent b2ca9cbd
...@@ -496,7 +496,7 @@ export class ElasticDatasource extends DataSourceApi<ElasticsearchQuery, Elastic ...@@ -496,7 +496,7 @@ export class ElasticDatasource extends DataSourceApi<ElasticsearchQuery, Elastic
}); });
const payload = [header, esQuery].join('\n') + '\n'; const payload = [header, esQuery].join('\n') + '\n';
const url = this.getMultiSearchUrl(); const url = this.getMultiSearchUrl();
const response = await this.post(url, payload); const response = await this.post(url, payload).toPromise();
const targets: ElasticsearchQuery[] = [{ refId: `${row.dataFrame.refId}`, metrics: [], isLogsQuery: true }]; const targets: ElasticsearchQuery[] = [{ refId: `${row.dataFrame.refId}`, metrics: [], isLogsQuery: true }];
const elasticResponse = new ElasticResponse(targets, transformHitsBasedOnDirection(response, sort)); const elasticResponse = new ElasticResponse(targets, transformHitsBasedOnDirection(response, sort));
const logResponse = elasticResponse.getLogs(this.logMessageField, this.logLevelField); const logResponse = elasticResponse.getLogs(this.logMessageField, this.logLevelField);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment