Explore: Uses RFC3339Nano string to retrieve LogRow contexts from Loki API (#17813)

* Refactor: Uses nanosecond string to retreive LogRow contexts

* Reafactor: Small changes to comments after PR comments
This commit is contained in:
Hugo Häggmark
2019-06-28 10:47:19 +02:00
committed by GitHub
parent 0b9de3f761
commit 2379de53c4
3 changed files with 64 additions and 39 deletions

View File

@@ -310,13 +310,13 @@ export class LokiDatasource extends DataSourceApi<LokiQuery, LokiOptions> {
return {
...commontTargetOptons,
start: timeEpochNs - contextTimeBuffer,
end: timeEpochNs,
end: row.timestamp,
direction,
};
} else {
return {
...commontTargetOptons,
start: timeEpochNs, // TODO: We should add 1ns here for the original row not no be included in the result
start: row.timestamp, // start param in Loki API is inclusive so we'll have to filter out the row that this request is based from
end: timeEpochNs + contextTimeBuffer,
};
}