justtrackio / gosoline

Gosoline is our framework which fuels all of our Golang applications
MIT License
96 stars 50 forks source link

tracing: automatically generate trace ids even with disabled tracing to keep our logs from one request grouped together #1157

Closed ajscholl closed 1 month ago

ajscholl commented 2 months ago

Having a trace id is a valuable help in reading logs as all events from one event are grouped together. However, we don't always want to have tracing enabled as it can cause quite some costs. To get the best of both worlds, this MR tries to generate a gosoline-specific trace id to include in logs.