live: rename url param - assume stable schema by default (#33383)

This commit is contained in:
Alexander Emelin
2021-04-26 20:46:26 +03:00
committed by GitHub
parent c41b5d80a3
commit 2abd9bc3b9
6 changed files with 21 additions and 19 deletions
+3 -3
View File
@@ -71,7 +71,7 @@ func (g *Gateway) Handle(ctx *models.ReqContext) {
// TODO Grafana 8: decide which formats to use or keep all.
urlValues := ctx.Req.URL.Query()
frameFormat := pushurl.FrameFormatFromValues(urlValues)
stableSchema := pushurl.StableSchemaFromValues(urlValues)
unstableSchema := pushurl.UnstableSchemaFromValues(urlValues)
body, err := ctx.Req.Body().Bytes()
if err != nil {
@@ -83,7 +83,7 @@ func (g *Gateway) Handle(ctx *models.ReqContext) {
"protocol", "http",
"streamId", streamID,
"bodyLength", len(body),
"stableSchema", stableSchema,
"unstableSchema", unstableSchema,
"frameFormat", frameFormat,
)
@@ -102,7 +102,7 @@ func (g *Gateway) Handle(ctx *models.ReqContext) {
// interval = "1s" vs flush_interval = "5s"
for _, mf := range metricFrames {
err := stream.Push(mf.Key(), mf.Frame(), stableSchema)
err := stream.Push(mf.Key(), mf.Frame(), unstableSchema)
if err != nil {
ctx.Resp.WriteHeader(http.StatusInternalServerError)
return