I have my application logs from logstash in the below format.
{
"Timestamp": "2015-09-09T10:54:57.4562725+00:00",
"Message": "Started processing",
"MessageId": "b80fb2aa-4b7b-4f49-9e60-865c6afa688e",
"ClientName": "TestClient"
}
{
"Timestamp": "2015-09-09T10:55:57.4562725+00:00",
"Message": "Done processing",
"MessageId": "b80fb2aa-4b7b-4f49-9e60-865c6afa688e",
"ClientName": "TestClient"
}
{
"Timestamp": "2015-09-09T10:55:57.4562727+00:00",
"Message": "Time Elapsed: 561 ms",
"MessageId": "b80fb2aa-4b7b-4f49-9e60-865c6afa688e",
"ClientName": "TestClient"
}
What I am trying to achieve is to get the average processing time (all logging done with same MessageId are part of one processing cycle).
The last log in every transaction has the processing time ( as shown above: "Message": "Time Elapsed: 561 ms"), how can i get the average? Any ideas?