Prometheus: Chore - Remove incorrect FrameType from exemplar frame (#57695)
This commit is contained in:
@@ -598,7 +598,11 @@ func exemplarToDataFrames(response []apiv1.ExemplarQueryResult, query *Prometheu
|
||||
dataFields = append(dataFields, data.NewField(label, nil, labelsVector[label]))
|
||||
}
|
||||
|
||||
return append(frames, newDataFrame("exemplar", "exemplar", dataFields...))
|
||||
newFrame := newDataFrame("exemplar", "exemplar", dataFields...)
|
||||
// unset on exemplars (ugly but this client will be deprecated soon)
|
||||
newFrame.Meta.Type = ""
|
||||
|
||||
return append(frames, newFrame)
|
||||
}
|
||||
|
||||
func sortedLabels(labelsVector map[string][]string) []string {
|
||||
|
||||
@@ -706,7 +706,11 @@ func TestPrometheus_parseTimeSeriesResponse(t *testing.T) {
|
||||
data.NewField("traceID", map[string]string{}, []string{"test1", "test2"}),
|
||||
data.NewField("userID", map[string]string{}, []string{"", "test3"}),
|
||||
}
|
||||
if diff := cmp.Diff(newDataFrame("exemplar", "exemplar", fields...), res[0], data.FrameTestCompareOptions()...); diff != "" {
|
||||
|
||||
newFrame := newDataFrame("exemplar", "exemplar", fields...)
|
||||
newFrame.Meta.Type = ""
|
||||
|
||||
if diff := cmp.Diff(newFrame, res[0], data.FrameTestCompareOptions()...); diff != "" {
|
||||
t.Errorf("Result mismatch (-want +got):\n%s", diff)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user