@@ -669,54 +669,62 @@ func (s *PrometheusInstantQueryData) MarshalJSON() ([]byte, error) {
669669 switch s .ResultType {
670670 case model .ValVector .String ():
671671 res := struct {
672- ResultType string `json:"resultType"`
673- Data []* Sample `json:"result"`
674- Stats * PrometheusResponseStats `json:"stats,omitempty"`
675- Analysis * Analysis `json:"analysis,omitempty"`
672+ ResultType string `json:"resultType"`
673+ Data []* Sample `json:"result"`
674+ Stats * PrometheusResponseStats `json:"stats,omitempty"`
675+ Analysis * Analysis `json:"analysis,omitempty"`
676+ SeriesStatsCounter * SeriesStatsCounter `json:"seriesStatsCounter,omitempty"`
676677 }{
677- ResultType : s .ResultType ,
678- Data : s .Result .GetVector ().Samples ,
679- Stats : s .Stats ,
680- Analysis : s .Analysis ,
678+ ResultType : s .ResultType ,
679+ Data : s .Result .GetVector ().Samples ,
680+ Stats : s .Stats ,
681+ Analysis : s .Analysis ,
682+ SeriesStatsCounter : s .SeriesStatsCounter ,
681683 }
682684 return json .Marshal (res )
683685 case model .ValMatrix .String ():
684686 res := struct {
685- ResultType string `json:"resultType"`
686- Data []* SampleStream `json:"result"`
687- Stats * PrometheusResponseStats `json:"stats,omitempty"`
688- Analysis * Analysis `json:"analysis,omitempty"`
687+ ResultType string `json:"resultType"`
688+ Data []* SampleStream `json:"result"`
689+ Stats * PrometheusResponseStats `json:"stats,omitempty"`
690+ Analysis * Analysis `json:"analysis,omitempty"`
691+ SeriesStatsCounter * SeriesStatsCounter `json:"seriesStatsCounter,omitempty"`
689692 }{
690- ResultType : s .ResultType ,
691- Data : s .Result .GetMatrix ().SampleStreams ,
692- Stats : s .Stats ,
693- Analysis : s .Analysis ,
693+ ResultType : s .ResultType ,
694+ Data : s .Result .GetMatrix ().SampleStreams ,
695+ Stats : s .Stats ,
696+ Analysis : s .Analysis ,
697+ SeriesStatsCounter : s .SeriesStatsCounter ,
694698 }
695699 return json .Marshal (res )
696700 case model .ValScalar .String ():
697701 res := struct {
698- ResultType string `json:"resultType"`
699- Data * cortexpb.Sample `json:"result"`
700- Stats * PrometheusResponseStats `json:"stats,omitempty"`
701- Analysis * Analysis `json:"analysis,omitempty"`
702+ ResultType string `json:"resultType"`
703+ Data * cortexpb.Sample `json:"result"`
704+ Stats * PrometheusResponseStats `json:"stats,omitempty"`
705+ Analysis * Analysis `json:"analysis,omitempty"`
706+ SeriesStatsCounter * SeriesStatsCounter `json:"seriesStatsCounter,omitempty"`
702707 }{
703- ResultType : s .ResultType ,
704- Data : s .Result .GetScalar (),
705- Stats : s .Stats ,
706- Analysis : s .Analysis ,
708+ ResultType : s .ResultType ,
709+ Data : s .Result .GetScalar (),
710+ Stats : s .Stats ,
711+ Analysis : s .Analysis ,
712+ SeriesStatsCounter : s .SeriesStatsCounter ,
707713 }
708714 return json .Marshal (res )
709715 case model .ValString .String ():
710716 res := struct {
711- ResultType string `json:"resultType"`
712- Data * StringSample `json:"result"`
713- Stats * PrometheusResponseStats `json:"stats,omitempty"`
714- Analysis * Analysis `json:"analysis,omitempty"`
717+ ResultType string `json:"resultType"`
718+ Data * StringSample `json:"result"`
719+ Stats * PrometheusResponseStats `json:"stats,omitempty"`
720+ Analysis * Analysis `json:"analysis,omitempty"`
721+ SeriesStatsCounter * SeriesStatsCounter `json:"seriesStatsCounter,omitempty"`
715722 }{
716- ResultType : s .ResultType ,
717- Data : s .Result .GetStringSample (),
718- Stats : s .Stats ,
719- Analysis : s .Analysis ,
723+ ResultType : s .ResultType ,
724+ Data : s .Result .GetStringSample (),
725+ Stats : s .Stats ,
726+ Analysis : s .Analysis ,
727+ SeriesStatsCounter : s .SeriesStatsCounter ,
720728 }
721729 return json .Marshal (res )
722730 default :
0 commit comments