Describe the bug
intermittently we see some records are missing fields from the JSON log. In the following block I have added spaces to emphasize the missing fields. In the 4th row of output the host, ibm_userDir and ibm_serverName fields are missing.
{"type":"liberty_trace","host":"acmeair-flightservice-6bb498d95c-czt7w","ibm_userDir":"\/opt\/ibm\/wlp\/usr\/","ibm_serverName":"defaultServer","message":"Search for flights from CDG to YUL on Mon May 25 00:00:00 GMT 2020", "ibm_threadId":"00000b2d","ibm_datetime":"2020-05-13T18:08:19.781+0000","module":"com.acmeair.service.FlightService","loglevel":"FINE", "ibm_sequence":"1589393299781_0000000044510","ext_thread":"Default Executor-thread-2788"}
{"type":"liberty_trace","host":"acmeair-flightservice-6bb498d95c-czt7w","ibm_userDir":"\/opt\/ibm\/wlp\/usr\/","ibm_serverName":"defaultServer","message":"flightSegmentIdAndScheduledDepartureTimeQueryString AA379Tue May 19 00:00:00 GMT 2020", "ibm_threadId":"00000b4b","ibm_datetime":"2020-05-13T18:08:19.781+0000","module":"com.acmeair.service.FlightService","loglevel":"FINE", "ibm_sequence":"1589393299781_0000000044511","ext_thread":"Default Executor-thread-2818"}
{"type":"liberty_trace","host":"acmeair-flightservice-6bb498d95c-czt7w","ibm_userDir":"\/opt\/ibm\/wlp\/usr\/","ibm_serverName":"defaultServer","message":"Returning []", "ibm_threadId":"00000b4b","ibm_datetime":"2020-05-13T18:08:19.781+0000","module":"com.acmeair.service.FlightService","loglevel":"FINEST","ibm_sequence":"1589393299781_0000000044513","ext_thread":"Default Executor-thread-2818"}
{"type":"liberty_trace", "message":"Segment {\"_id\": \"AA279\", \"originPort\": \"CDG\", \"destPort\": \"YUL\", \"miles\": 3433}", "ibm_threadId":"00000b2d","ibm_datetime":"2020-05-13T18:08:19.781+0000","module":"com.acmeair.service.FlightService","loglevel":"FINE", "ibm_sequence":"1589393299781_0000000044512","ext_thread":"Default Executor-thread-2788"}
{"type":"liberty_trace","host":"acmeair-flightservice-6bb498d95c-czt7w","ibm_userDir":"\/opt\/ibm\/wlp\/usr\/","ibm_serverName":"defaultServer","message":"Segment in JSON {\"_id\":\"AA279\",\"originPort\":\"CDG\",\"destPort\":\"YUL\",\"miles\":3433}","ibm_threadId":"00000b2d","ibm_datetime":"2020-05-13T18:08:19.781+0000","module":"com.acmeair.service.FlightService","loglevel":"FINE", "ibm_sequence":"1589393299781_0000000044514","ext_thread":"Default Executor-thread-2788"}
searching for this problem in logs can be done as follows:
oc logs <pod> | grep -v "ibm_serverName"
Expected behavior
expect the host, ibm_userDir and ibm_serverName fields to be present on all liberty_trace events
Diagnostic information:
OpenLiberty Version: 20.0.0.4
Java Version:
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 8.0.6.7 - pxa6480sr6fp7-20200312_01(SR6 FP7))
IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20200219_440062 (JIT enabled, AOT enabled)
OpenJ9 - 3088245
OMR - eb95a4d
IBM - 83517b6)
JCL - 20200310_01 based on Oracle jdk8u241-b07
Additional context
Add any other context about the problem here.
Describe the bug intermittently we see some records are missing fields from the JSON log. In the following block I have added spaces to emphasize the missing fields. In the 4th row of output the
host
,ibm_userDir
andibm_serverName
fields are missing.searching for this problem in logs can be done as follows:
Expected behavior expect the
host
,ibm_userDir
andibm_serverName
fields to be present on all liberty_trace eventsDiagnostic information:
Additional context Add any other context about the problem here.