Commit 708bf188 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'bastianccm-master-patch-53163' into 'master'

Error Tracking: Fix collecting errors for golang

See merge request gitlab-org/gitlab!78199
parents 5e6413e3 e0d5bee3
......@@ -13,57 +13,72 @@
"type": "object"
},
"exception": {
"type": "object",
"required": ["values"],
"properties": {
"values": {
"oneOf": [
{
"type": "array",
"items": {
"type": "object",
"required": [],
"properties": {
"type": {
"type": "string"
},
"value": {
"type": "string"
},
"stacktrace": {
"$ref": "#/definitions/exception"
}
},
{
"type": "object",
"required": ["values"],
"properties": {
"values": {
"type": "array",
"items": {
"$ref": "#/definitions/exception"
}
}
}
}
]
}
},
"definitions": {
"exception": {
"type": "object",
"required": [],
"properties": {
"type": {
"type": "string"
},
"value": {
"type": "string"
},
"stacktrace": {
"type": "object",
"required": [],
"properties": {
"frames": {
"type": "array",
"items": {
"type": "object",
"required": [],
"properties": {
"frames": {
"type": "array",
"items": {
"type": "object",
"required": [],
"properties": {
"abs_path": {
"type": "string"
},
"function": {
"type": "string"
},
"lineno": {
"type": "number"
},
"in_app": {
"type": "boolean"
},
"filename": {
"type": "string"
},
"pre_context": {
"type": "array"
},
"context_line": {
"type": ["string", "null"]
},
"post_context": {
"type": "array"
}
}
}
"abs_path": {
"type": "string"
},
"function": {
"type": "string"
},
"lineno": {
"type": "number"
},
"in_app": {
"type": "boolean"
},
"filename": {
"type": "string"
},
"pre_context": {
"type": "array"
},
"context_line": {
"type": ["string", "null"]
},
"post_context": {
"type": "array"
}
}
}
......
......@@ -42,6 +42,12 @@ RSpec.describe ErrorTracking::Collector::PayloadValidator do
it_behaves_like 'valid payload'
end
context 'go payload' do
let(:payload) { Gitlab::Json.parse(fixture_file('error_tracking/go_parsed_event.json')) }
it_behaves_like 'valid payload'
end
context 'empty payload' do
let(:payload) { '' }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment