Files
grafana/pkg/util/converter/testdata/loki-streams-a-frame.json
T
Gábor Farkas da74dba7c8 Loki: backend: use streaming JSON parser, try2 (#48752)
* 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

* fixed converter/prom tests

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-05 13:09:01 +02:00

90 lines
2.6 KiB
JSON

{
"frames": [
{
"schema": {
"meta": {
"custom": {
"stats": {
"store": {
"headChunkBytes": 0,
"headChunkLines": 0,
"compressedBytes": 31432,
"decompressedBytes": 7772,
"decompressedLines": 55,
"totalDuplicates": 0,
"totalChunksRef": 2,
"totalChunksDownloaded": 2,
"chunksDownloadTime": 0.000390958
},
"ingester": {
"totalReached": 0,
"headChunkBytes": 0,
"totalDuplicates": 0,
"headChunkLines": 0,
"decompressedBytes": 0,
"decompressedLines": 0,
"compressedBytes": 0,
"totalChunksMatched": 0,
"totalBatches": 0,
"totalLinesSent": 0
},
"summary": {
"bytesProcessedPerSecond": 3507022,
"linesProcessedPerSecond": 24818,
"totalBytesProcessed": 7772,
"totalLinesProcessed": 55,
"execTime": 0.002216125
}
}
}
},
"fields": [
{
"name": "__labels",
"type": "other",
"typeInfo": {
"frame": "json.RawMessage"
}
},
{
"name": "Time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
}
},
{
"name": "Line",
"type": "string",
"typeInfo": {
"frame": "string"
}
},
{
"name": "TS",
"type": "string",
"typeInfo": {
"frame": "string"
}
}
]
},
"data": {
"values": [
[
{"level":"error","location":"moon🌙"},{"level":"info","location":"moon🌙"},{"level":"info","location":"moon🌙"},{"level":"info","location":"moon🌙"},{"level":"info","location":"moon🌙"},{"level":"info","location":"moon🌙"}
],
[
1645030244810,1645030247027,1645030246277,1645030246277,1645030245539,1645030244091
],
[
"log line error 1","log line info 1","log line info 2","log line info 2","log line info 3","log line info 4"
],
[
"1645030244810757120","1645030247027735040","1645030246277587968","1645030246277587968","1645030245539423744","1645030244091700992"
]
]
}
}
]
}