Prometheus: Annotation query filtering values less then 1 (#53969)

* prevent annotation query from filtering values less then 1
* unit tests were asserting that gaps in data (0 value) are removed from annotation, update filter to exclude 0
This commit is contained in:
Galen Kistler
2022-10-06 09:26:08 -05:00
committed by GitHub
parent 01526d9053
commit 8fd4fcb987

View File

@@ -796,7 +796,7 @@ export class PrometheusDatasource
timeValueTuple.push([timeStampValue, valueValue]);
});
const activeValues = timeValueTuple.filter((value) => value[1] >= 1);
const activeValues = timeValueTuple.filter((value) => value[1] > 0);
const activeValuesTimestamps = activeValues.map((value) => value[0]);
// Instead of creating singular annotation for each active event we group events into region if they are less