[BUG] contrib/log/slog: log/slog.Handler is replaced by internal handler after Logger.With or Logger.WithGroup call #2838
Labels
apm:ecosystem
contrib/* related feature requests or bugs
bug
unintended behavior that has to be fixed
Version of dd-trace-go
v1.67.0
Describe what happened:
dd-trace-go.v1/contrib/log/slog.Handler is replaced by internal handler after Logger.With or Logger.WithGroup call.
That's because it doesn't implement its own WithAttrs and WithGroup and just uses internal handler's method.
https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/log/slog/logger.go;l=132
Describe what you expected:
slog.Logger keeps dd-trace-go.v1/contrib/log/slog.Handler after Logger.With or Logger.WithGroup call.
Steps to reproduce the issue:
You can confirm that the logger's Handler is replaced after logger.With or logger.WithGroup call.
Additional environment details (Version of Go, Operating System, etc.):
N/A
The text was updated successfully, but these errors were encountered: