Patrick C.
Patrick C.

Reputation: 1429

Question on how to capture response time in line graph based on logs

I have a Sumo Logic log stream like:

_sourceCategory=IDT/ITServices/Tomcat/someApp/prod/AppEvt_someApp

I have two log entries like the below, showing the begin and end of an API call:

2024-10-28 09:21:50.443 INFO 1 --- [scheduling-1] a.c.s.a.e.service.AbcService : job.stream=FG END - Calling ABC
2024-10-28 09:21:49.789 INFO 1 --- [scheduling-1] a.c.s.a.e.service.AbcService : job.stream=FG BEGIN - Calling ABC

I want to capture the average time taken by the API call,
e.g. for a timeslice of 15min, we sum up all the response times (difference in the END time and BEGIN time log) and divide it by the number of calls in a 15min interval.

I am able to parse the timestamp out from the log entry, but I am not sure how I can do a timestamp subtraction, and to average it over time.

May I know what would be the Sumo Logic query such that I can show the response time in line graph? Thanks.

Upvotes: 0

Views: 24

Answers (0)

Related Questions