Loki: Remove alpha feature toggle lokiDataframeApi (#65918)

loki: remove experimental feature-flag
This commit is contained in:
Gábor Farkas
2023-04-13 15:22:09 +02:00
committed by GitHub
parent 531caec602
commit b928fce070
8 changed files with 2 additions and 119 deletions
+2 -14
View File
@@ -13,8 +13,6 @@ import (
"github.com/gorilla/websocket"
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/data"
"github.com/grafana/grafana/pkg/services/featuremgmt"
)
func (s *Service) SubscribeStream(_ context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error) {
@@ -84,15 +82,9 @@ func (s *Service) RunStream(ctx context.Context, req *backend.RunStreamRequest,
params := url.Values{}
params.Add("query", query.Expr)
lokiDataframeApi := s.features.IsEnabled(featuremgmt.FlagLokiDataframeApi)
wsurl, _ := url.Parse(dsInfo.URL)
if lokiDataframeApi {
wsurl.Path = "/loki/api/v2alpha/tail"
} else {
wsurl.Path = "/loki/api/v1/tail"
}
wsurl.Path = "/loki/api/v2alpha/tail"
if wsurl.Scheme == "https" {
wsurl.Scheme = "wss"
@@ -133,11 +125,7 @@ func (s *Service) RunStream(ctx context.Context, req *backend.RunStreamRequest,
}
frame := &data.Frame{}
if !lokiDataframeApi {
frame, err = lokiBytesToLabeledFrame(message)
} else {
err = json.Unmarshal(message, &frame)
}
err = json.Unmarshal(message, &frame)
if err == nil && frame != nil {
next, _ := data.FrameToJSONCache(frame)