mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Prometheus: Update FrameType and make __name__ the field name (#62694)
These changes would make the response more in line with the dataplane contract, changes are under the feature toggle prometheusDataplane
This commit is contained in:
@@ -43,6 +43,7 @@ type QueryData struct {
|
||||
URL string
|
||||
TimeInterval string
|
||||
enableWideSeries bool
|
||||
enableDataplane bool
|
||||
exemplarSampler func() exemplar.Sampler
|
||||
}
|
||||
|
||||
@@ -82,6 +83,7 @@ func New(
|
||||
ID: settings.ID,
|
||||
URL: settings.URL,
|
||||
enableWideSeries: features.IsEnabled(featuremgmt.FlagPrometheusWideSeries),
|
||||
enableDataplane: features.IsEnabled(featuremgmt.FlagPrometheusDataplane),
|
||||
exemplarSampler: exemplarSampler,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ func (s *QueryData) parseResponse(ctx context.Context, q *models.Query, res *htt
|
||||
r := converter.ReadPrometheusStyleResult(iter, converter.Options{
|
||||
MatrixWideSeries: s.enableWideSeries,
|
||||
VectorWideSeries: s.enableWideSeries,
|
||||
Dataplane: s.enableDataplane,
|
||||
})
|
||||
|
||||
// Add frame to attach metadata
|
||||
|
||||
Reference in New Issue
Block a user