Loki: backend: use streaming JSON parser (#47656)
* converter: remove __name__ customization because Loki does not do that Loki does not handle __name__ in a special way. for Prometheus, the caller can implement the formatting by themselves * converter: change labels-formatting the labels.String() method does not handle strange values well * loki: backend: use streaming-json parser * more idiomatic code Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com> * simpler row-length check * simpler code Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
This commit is contained in:
co-authored by
Todd Treece
parent
83a5ca95c7
commit
46b40b6e82
+5
-3
@@ -14,12 +14,13 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"name": "Value",
|
||||
"type": "number",
|
||||
"typeInfo": {
|
||||
"frame": "float64"
|
||||
},
|
||||
"labels": {
|
||||
"__name__": "up",
|
||||
"job": "prometheus",
|
||||
"instance": "localhost:9090"
|
||||
}
|
||||
@@ -51,14 +52,15 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"name": "Value",
|
||||
"type": "number",
|
||||
"typeInfo": {
|
||||
"frame": "float64"
|
||||
},
|
||||
"labels": {
|
||||
"job": "node",
|
||||
"instance": "localhost:9100"
|
||||
"instance": "localhost:9100",
|
||||
"__name__": "up"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user