Live: check schema equality between push messages (#34548)

This commit is contained in:
Ryan McKinley
2021-05-27 02:55:42 -07:00
committed by GitHub
parent c59a2e1bcf
commit 67028af99e
11 changed files with 54 additions and 100 deletions

View File

@@ -174,13 +174,11 @@ func (s *Handler) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
// TODO Grafana 8: decide which formats to use or keep all.
urlValues := r.URL.Query()
frameFormat := pushurl.FrameFormatFromValues(urlValues)
unstableSchema := pushurl.UnstableSchemaFromValues(urlValues)
logger.Debug("Live Push request",
"protocol", "http",
"streamId", streamID,
"bodyLength", len(body),
"unstableSchema", unstableSchema,
"frameFormat", frameFormat,
)
@@ -191,7 +189,7 @@ func (s *Handler) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
}
for _, mf := range metricFrames {
err := stream.Push(user.OrgId, mf.Key(), mf.Frame(), unstableSchema)
err := stream.Push(user.OrgId, mf.Key(), mf.Frame())
if err != nil {
return
}