Files
grafana/pkg/util/converter/testdata/prom-matrix-frame.json
T
Gábor Farkas 46b40b6e82 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>
2022-05-05 08:47:40 +02:00

80 lines
1.5 KiB
JSON

{
"frames": [
{
"schema": {
"meta": {
"type": "timeseries-many"
},
"fields": [
{
"name": "Time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
}
},
{
"name": "Value",
"type": "number",
"typeInfo": {
"frame": "float64"
},
"labels": {
"job": "prometheus",
"instance": "localhost:9090",
"__name__": "up"
}
}
]
},
"data": {
"values": [
[
1435781430781,1435781445781,1435781460781
],
[
1,1,1
]
]
}
},
{
"schema": {
"meta": {
"type": "timeseries-many"
},
"fields": [
{
"name": "Time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
}
},
{
"name": "Value",
"type": "number",
"typeInfo": {
"frame": "float64"
},
"labels": {
"__name__": "up",
"job": "node",
"instance": "localhost:9091"
}
}
]
},
"data": {
"values": [
[
1435781430781,1435781445781,1435781460781
],
[
0,0,1
]
]
}
}
]
}