[EDIT]
That worked but I just slightly changed the way I am saving logs to splunk.
So in Query 2-
In my code I am saving like ( "Second message length{length} date{date}) length is something that I am setting dynamically in my code. date will be today's date.
So, basically I will be extracting the value of length from Query 2 where date = "some random date"
and then I will compare it with the count of Query 1
Query 1-
index=staging "service-name" "First message" | timechart count by data.status
... View more