Converter: Add support for parsing error & warning from prometheus results (#48721)

This commit is contained in:
Todd Treece 2022-05-04 15:01:18 -04:00 committed by GitHub
parent 570ff074f6
commit 6e6f6e3cce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 494 additions and 5 deletions

View File

@ -19,6 +19,9 @@ func logf(format string, a ...interface{}) {
func ReadPrometheusStyleResult(iter *jsoniter.Iterator) *backend.DataResponse {
var rsp *backend.DataResponse
status := "unknown"
errorType := ""
err := ""
warnings := []data.Notice{}
for l1Field := iter.ReadObject(); l1Field != ""; l1Field = iter.ReadObject() {
switch l1Field {
@ -28,22 +31,58 @@ func ReadPrometheusStyleResult(iter *jsoniter.Iterator) *backend.DataResponse {
case "data":
rsp = readPrometheusData(iter)
// case "error":
// case "errorType":
// case "warnings":
case "error":
err = iter.ReadString()
case "errorType":
errorType = iter.ReadString()
case "warnings":
warnings = readWarnings(iter)
default:
v := iter.Read()
logf("[ROOT] TODO, support key: %s / %v\n", l1Field, v)
}
}
if status != "success" {
logf("ERROR: %s\n", status)
if status == "error" {
return &backend.DataResponse{
Error: fmt.Errorf("%s: %s", errorType, err),
}
}
if len(warnings) > 0 {
for _, frame := range rsp.Frames {
if frame.Meta == nil {
frame.Meta = &data.FrameMeta{}
}
frame.Meta.Notices = warnings
}
}
return rsp
}
func readWarnings(iter *jsoniter.Iterator) []data.Notice {
warnings := []data.Notice{}
if iter.WhatIsNext() != jsoniter.ArrayValue {
return warnings
}
for iter.ReadArray() {
if iter.WhatIsNext() == jsoniter.StringValue {
notice := data.Notice{
Severity: data.NoticeSeverityWarning,
Text: iter.ReadString(),
}
warnings = append(warnings, notice)
}
}
return warnings
}
func readPrometheusData(iter *jsoniter.Iterator) *backend.DataResponse {
t := iter.WhatIsNext()
if t == jsoniter.ArrayValue {

View File

@ -20,6 +20,8 @@ func TestReadPromFrames(t *testing.T) {
"prom-matrix-with-nans",
"prom-vector",
"prom-series",
"prom-warnings",
"prom-error",
"prom-exemplars",
"loki-streams-a",
"loki-streams-b",
@ -59,6 +61,11 @@ func TestReadPromFrames(t *testing.T) {
require.NoError(t, err)
}
// skip checking golden file for error response. it's not currently supported
if name == "prom-error" {
return
}
fpath = path.Join("testdata", name+"-golden.txt")
err = experimental.CheckGoldenDataResponse(fpath, rsp, true)
assert.NoError(t, err)

View File

@ -0,0 +1,3 @@
{
"error": "bad_data: invalid parameter \"start\": cannot parse \"\" to a valid timestamp"
}

View File

@ -0,0 +1,3 @@
ERROR: bad_data: invalid parameter "start": cannot parse "" to a valid timestamp====== TEST DATA RESPONSE (arrow base64) ======
ERROR=bad_data: invalid parameter "start": cannot parse "" to a valid timestamp

View File

@ -0,0 +1,5 @@
{
"status": "error",
"errorType": "bad_data",
"error": "invalid parameter \"start\": cannot parse \"\" to a valid timestamp"
}

View File

@ -0,0 +1,263 @@
{
"frames": [
{
"schema": {
"meta": {
"type": "timeseries-many",
"notices": [
{
"severity": "warning",
"text": "warning 1"
},
{
"severity": "warning",
"text": "warning 2"
}
]
},
"fields": [
{
"name": "Time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
}
},
{
"name": "up",
"type": "number",
"typeInfo": {
"frame": "float64"
},
"labels": {
"instance": "localhost:9090",
"job": "prometheus"
}
}
]
},
"data": {
"values": [
[
1435781451781
],
[
1
]
]
}
},
{
"schema": {
"meta": {
"type": "timeseries-many",
"notices": [
{
"severity": "warning",
"text": "warning 1"
},
{
"severity": "warning",
"text": "warning 2"
}
]
},
"fields": [
{
"name": "Time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
}
},
{
"name": "up",
"type": "number",
"typeInfo": {
"frame": "float64"
},
"labels": {
"instance": "localhost:9100",
"job": "node"
}
}
]
},
"data": {
"values": [
[
1435781451781
],
[
0
]
]
}
},
{
"schema": {
"meta": {
"type": "timeseries-many",
"notices": [
{
"severity": "warning",
"text": "warning 1"
},
{
"severity": "warning",
"text": "warning 2"
}
]
},
"fields": [
{
"name": "Time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
}
},
{
"name": "Value",
"type": "number",
"typeInfo": {
"frame": "float64"
},
"labels": {
"level": "error",
"location": "moon"
}
}
]
},
"data": {
"values": [
[
1645029699000
],
[
null
]
],
"entities": [
null,
{
"Inf": [
0
]
}
]
}
},
{
"schema": {
"meta": {
"type": "timeseries-many",
"notices": [
{
"severity": "warning",
"text": "warning 1"
},
{
"severity": "warning",
"text": "warning 2"
}
]
},
"fields": [
{
"name": "Time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
}
},
{
"name": "Value",
"type": "number",
"typeInfo": {
"frame": "float64"
},
"labels": {
"level": "info",
"location": "moon"
}
}
]
},
"data": {
"values": [
[
1645029699000
],
[
null
]
],
"entities": [
null,
{
"NegInf": [
0
]
}
]
}
},
{
"schema": {
"meta": {
"type": "timeseries-many",
"notices": [
{
"severity": "warning",
"text": "warning 1"
},
{
"severity": "warning",
"text": "warning 2"
}
]
},
"fields": [
{
"name": "Time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
}
},
{
"name": "Value",
"type": "number",
"typeInfo": {
"frame": "float64"
},
"labels": {
"level": "debug",
"location": "moon"
}
}
]
},
"data": {
"values": [
[
1645029699000
],
[
null
]
],
"entities": [
null,
{
"NaN": [
0
]
}
]
}
}
]
}

View File

@ -0,0 +1,132 @@
🌟 This was machine generated. Do not edit. 🌟
Frame[0] {
"type": "timeseries-many",
"notices": [
{
"severity": "warning",
"text": "warning 1"
},
{
"severity": "warning",
"text": "warning 2"
}
]
}
Name:
Dimensions: 2 Fields by 1 Rows
+-----------------------------------+-------------------------------------------------+
| Name: Time | Name: up |
| Labels: | Labels: instance=localhost:9090, job=prometheus |
| Type: []time.Time | Type: []float64 |
+-----------------------------------+-------------------------------------------------+
| 2015-07-01 20:10:51.781 +0000 UTC | 1 |
+-----------------------------------+-------------------------------------------------+
Frame[1] {
"type": "timeseries-many",
"notices": [
{
"severity": "warning",
"text": "warning 1"
},
{
"severity": "warning",
"text": "warning 2"
}
]
}
Name:
Dimensions: 2 Fields by 1 Rows
+-----------------------------------+-------------------------------------------+
| Name: Time | Name: up |
| Labels: | Labels: instance=localhost:9100, job=node |
| Type: []time.Time | Type: []float64 |
+-----------------------------------+-------------------------------------------+
| 2015-07-01 20:10:51.781 +0000 UTC | 0 |
+-----------------------------------+-------------------------------------------+
Frame[2] {
"type": "timeseries-many",
"notices": [
{
"severity": "warning",
"text": "warning 1"
},
{
"severity": "warning",
"text": "warning 2"
}
]
}
Name:
Dimensions: 2 Fields by 1 Rows
+-------------------------------+------------------------------------+
| Name: Time | Name: Value |
| Labels: | Labels: level=error, location=moon |
| Type: []time.Time | Type: []float64 |
+-------------------------------+------------------------------------+
| 2022-02-16 16:41:39 +0000 UTC | +Inf |
+-------------------------------+------------------------------------+
Frame[3] {
"type": "timeseries-many",
"notices": [
{
"severity": "warning",
"text": "warning 1"
},
{
"severity": "warning",
"text": "warning 2"
}
]
}
Name:
Dimensions: 2 Fields by 1 Rows
+-------------------------------+-----------------------------------+
| Name: Time | Name: Value |
| Labels: | Labels: level=info, location=moon |
| Type: []time.Time | Type: []float64 |
+-------------------------------+-----------------------------------+
| 2022-02-16 16:41:39 +0000 UTC | -Inf |
+-------------------------------+-----------------------------------+
Frame[4] {
"type": "timeseries-many",
"notices": [
{
"severity": "warning",
"text": "warning 1"
},
{
"severity": "warning",
"text": "warning 2"
}
]
}
Name:
Dimensions: 2 Fields by 1 Rows
+-------------------------------+------------------------------------+
| Name: Time | Name: Value |
| Labels: | Labels: level=debug, location=moon |
| Type: []time.Time | Type: []float64 |
+-------------------------------+------------------------------------+
| 2022-02-16 16:41:39 +0000 UTC | NaN |
+-------------------------------+------------------------------------+
====== TEST DATA RESPONSE (arrow base64) ======
FRAME=QVJST1cxAAD/////UAIAABAAAAAAAAoADgAMAAsABAAKAAAAFAAAAAAAAAEEAAoADAAAAAgABAAKAAAACAAAAOwAAAADAAAATAAAACgAAAAEAAAAQP7//wgAAAAMAAAAAAAAAAAAAAAFAAAAcmVmSWQAAABg/v//CAAAA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AAAAAAAAAAUAAAByZWZJZAAAAGz+//8IAAAADAAAAAAAAAAAAAAABAAAAG5hbWUAAAAAjP7//wgAAACEAAAAegAAAHsidHlwZSI6InRpbWVzZXJpZXMtbWFueSIsIm5vdGljZXMiOlt7InNldmVyaXR5Ijoid2FybmluZyIsInRleHQiOiJ3YXJuaW5nIDEifSx7InNldmVyaXR5Ijoid2FybmluZyIsInRleHQiOiJ3YXJuaW5nIDIifV19AAAEAAAAbWV0YQAAAAACAAAAuAAAAAQAAABi////FAAAAIAAAACAAAAAAAAAA4AAAAACAAAALAAAAAQAAABU////CAAAABAAAAAFAAAAVmFsdWUAAAAEAAAAbmFtZQAAAAB4////CAAAACwAAAAjAAAAeyJsZXZlbCI6ImRlYnVnIiwibG9jYXRpb24iOiJtb29uIn0ABgAAAGxhYmVscwAAAAAAAIr///8AAAIABQAAAFZhbHVlABIAGAAUAAAAEwAMAAAACAAEABIAAAAUAAAARAAAAEwAAAAAAAAKTAAAAAEAAAAMAAAACAAMAAgABAAIAAAACAAAABAAAAAEAAAAVGltZQAAAAAEAAAAbmFtZQAAAAAAAAAAAAAGAAgABgAGAAAAAAADAAQAAABUaW1lAAAAAHACAABBUlJPVzE=

View File

@ -0,0 +1,37 @@
{
"status" : "success",
"data" : {
"resultType" : "vector",
"result" : [
{
"metric" : {
"__name__" : "up",
"job" : "prometheus",
"instance" : "localhost:9090"
},
"value": [ 1435781451.781, "1" ]
},
{
"metric" : {
"__name__" : "up",
"job" : "node",
"instance" : "localhost:9100"
},
"value" : [ 1435781451.781, "0" ]
},
{
"metric": { "level": "error", "location": "moon"},
"value": [1645029699, "+Inf"]
},
{
"metric": { "level": "info", "location": "moon" },
"value": [1645029699, "-Inf"]
},
{
"metric": { "level": "debug", "location": "moon" },
"value": [1645029699, "NaN"]
}
]
},
"warnings" : ["warning 1", "warning 2"]
}