Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There is a new auto-generated schema for each request type that supports outputting JSON payloads for request and response payloads. These can be adapted to provide structured request tracing.

Public Interfaces

The auto-generated XYZDataJsonConverter exists for each request/response type with the following signature:

Code Block
titleMethod Signature of the auto-generated XYZDataJsonConverter
public class XYZDataJsonConverter {

	/* Converts the request/response data into a JsonNode*/
	public static JsonNode write(XYZData data, short version);


A new Scala singleton will be added to handle the data conversion to a JsonNode

Code Block
languagescala
titleMethod Signature of RequestConvertToJson
object RequestConvertToJson {

	/* Calls the appropriate XYZRequestDataJsonConverter.write() */
	def request(request: AbstractRequest, verbose: Boolean): JsonNode

	
	/* Calls the appropriate XYZResponseDataJsonConverter.write() */
	def response(response: AbstractResponse, version: Short): JsonNode
}


With these helper functions, Requests in logs will become easily parsable.

...

In order to a log request, the appropriate helper function in RequestConvertToJson is called on the request. From there, the respective XYZJsonDataConverter XYZDataJsonConverter is called and returns the JsonNode of the data which when converted to a string is in a parsable JSON format.

...