Prometheus: Fix interpolating minStep for range queries when incremental querying enabled (#107715)
* return calculatedMinStep in first frame of the response * update test files * make the custom metadata as type of map[string]any * append calculatedMinStep to custom metadata * fix exemplar frame checking
This commit is contained in:
@@ -54,6 +54,14 @@ func (s *QueryData) parseResponse(ctx context.Context, q *models.Query, res *htt
|
||||
addMetadataToMultiFrame(q, frame)
|
||||
if i == 0 {
|
||||
frame.Meta.ExecutedQueryString = executedQueryString(q)
|
||||
if frame.Meta.Custom == nil {
|
||||
frame.Meta.Custom = make(map[string]any)
|
||||
}
|
||||
if custom, ok := frame.Meta.Custom.(map[string]any); ok {
|
||||
// This is required for incremental querying feature
|
||||
// Knowing the calculated minStep is required for merging and caching the frames on frontend side
|
||||
custom["calculatedMinStep"] = q.Step.Milliseconds()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user