-
Notifications
You must be signed in to change notification settings - Fork 327
Description
As discussed in elastic support ticket 00352713 I open this feature request.
Is your feature request related to a problem? Please describe.
Last week I fell into the trap of addLabel for numbers and booleans requiring APM server 6.7 where we currently use 6.5.4. I find it unfortunate as the comatibility page says that the agent requires 6.5 or higher. In my mind compatible means that the server can import any data received from the agent(even if he ignores some fields). This is not the case as the server rejects any document from the agent if addLabel with numbers or booleans are used:
2019-06-18 14:19:07.606 [apm-reporter] WARN co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - {"accepted":155,"errors":[{"message":"Problem validating JSON document against schema: I[#] S[#] doesn't validate with "transaction#"\n I[#] S[#/allOf/0] allOf failed\n I[#/context/tags/JOBS_FOUND] S[#/allOf/0/properties/context/properties/tags/patternProperties/%5E%5B%5E.%2A%22%5D%2A$/type] expected string or null, but got number","document":...
Describe the solution you'd like
It would be great if the agent could check the server version on start and make the data compatible. In my example: Instead of sending the labels as numbers and booleans convert them to strings first.
Maybe you can even write a warning once into the log file?
Describe alternatives you've considered
Modifying the code would fix this problem, but this would mean that the new features cannot be used in environments with the newer APM server version.