-
Notifications
You must be signed in to change notification settings - Fork 539
Closed
Labels
Description
Howdy!
Preamble
I ran into a either deserialisation or specification problem. The spec define the id field of the Metadata.user schema that it can be of type "type": ["string", "integer", "null"].
Problem Description
The metadata.user.id serialised as number represented json object (e.g. "id": 123) without the quotation marks as defined by the JSON specification renders the apm-server to respond with a 500: Internal Server Error. But, when the id is serialized as a string (e.g. "id": "123") the apm-server responds with 200.
Payloads
Correct
"{"metadata": "service": {"name":"demo", "agent":{"name":"i-am-an-agent", "version":"6.7.0"}},"user":{"id":"12345","username":"foobar","email":"[email protected]"}}}
Failing
"{"metadata": "service": {"name":"demo", "agent":{"name":"i-am-an-agent", "version":"6.7.0"}},"user":{"id":12345,"username":"foobar","email":"[email protected]"}}}
APM Server Version
$ ./apm-server version
apm-server version 6.7.1 (amd64), libbeat 6.7.1 [5665711214eb3fcb956e7d1c61795e427bf97097 built 2019-04-02 14:55:06 +0000 UTC]