Loki: Remove alpha feature toggle lokiDataframeApi (#65918)
loki: remove experimental feature-flag
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user