samber / slog-gin

🚨 Gin middleware for slog logger
https://pkg.go.dev/github.com/samber/slog-gin
MIT License
115 stars 13 forks source link

Include TraceID and SpanID only for the recording spans #20

Closed empire closed 5 months ago

empire commented 5 months ago

Logging non-recording spans is uninformative for troubleshooting and absent in tracing platforms like Jaeger.

empire commented 5 months ago

@samber, there are no tests in this package to validate this modification. While I explored other repositories mentioned in the README, I couldn't find any suitable ones to reference. However, I believe it would be beneficial to update example.go to incorporate traces as well. If you're in agreement, we can proceed with modifying the file to include traces.

samber commented 5 months ago

+1

yes, feel free to add a self-explaining example !

i will update the other packages as well