I've got a lot of applications, each one have her own log. I'm typically in a distributed logs problematic.
To resolve this problematic, I'm using :
- Brave / Spring Sleuth to generate trace and span ids
- Elastic/Logstash/Kibana to centralize and search in my logs
This way, I'm able to see all the application logs in the order they where written (by their timestamp). But the fact is that I can't trust the timestamp written in the logs. All the server's clocks are not synchronized.
So I need something which will help me to sort all my logs.
I've thought at generating a number at each span :
app1 : sequenceId = {}
app2 : sequenceId = {}
app3 : sequenceId = {}
app4 : sequenceId = {}
app5 : sequenceId = {}
app6 : sequenceId = {}
app7 : sequenceId = {}
app8 : sequenceId = {}
which would expect something which will order the logs in this order : app1, app2, app3, app4, app5, app6, app7, app8
Does someone knows a technic which adresses this problematic ?