Skip to content

Commit e03e6a0

Browse files
committed
add code
1 parent 27e1347 commit e03e6a0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

internal/cortex/querier/queryrange/query_range.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -595,10 +595,11 @@ func (s *StringSample) UnmarshalJSON(b []byte) error {
595595
// UnmarshalJSON implements json.Unmarshaler.
596596
func (s *PrometheusInstantQueryData) UnmarshalJSON(data []byte) error {
597597
var queryData struct {
598-
ResultType string `json:"resultType"`
599-
Result jsoniter.RawMessage `json:"result"`
600-
Stats *PrometheusResponseStats `json:"stats,omitempty"`
601-
Analysis *Analysis `json:"analysis,omitempty"`
598+
ResultType string `json:"resultType"`
599+
Result jsoniter.RawMessage `json:"result"`
600+
Stats *PrometheusResponseStats `json:"stats,omitempty"`
601+
Analysis *Analysis `json:"analysis,omitempty"`
602+
SeriesStatsCounter *SeriesStatsCounter `json:"seriesStatsCounter,omitempty"`
602603
}
603604

604605
if err := json.Unmarshal(data, &queryData); err != nil {
@@ -608,6 +609,7 @@ func (s *PrometheusInstantQueryData) UnmarshalJSON(data []byte) error {
608609
s.ResultType = queryData.ResultType
609610
s.Stats = queryData.Stats
610611
s.Analysis = queryData.Analysis
612+
s.SeriesStatsCounter = queryData.SeriesStatsCounter
611613
switch s.ResultType {
612614
case model.ValVector.String():
613615
var result struct {

0 commit comments

Comments
 (0)