The latency attribute that the handler logs is of type time.Duration which works fine if we are logging to stdout but once the fluentd handler is called it fails with a ErrUnsupportedType error for this attribute. I have traced the error to this msgp package since fluentd uses it for serialization.
I think there might be a case statement missing in msgp/write_bytes.go in AppendInt() for the time.Duration type which I support for was "added" in https://github.com/tinylib/msgp/pull/311.
We are using
slog
and specifically https://github.com/samber/slog-fluentd and https://github.com/samber/slog-echo for logging HTTP traces.The
latency
attribute that the handler logs is of typetime.Duration
which works fine if we are logging tostdout
but once thefluentd
handler is called it fails with aErrUnsupportedType
error for this attribute. I have traced the error to thismsgp
package sincefluentd
uses it for serialization.I think there might be a case statement missing in
msgp/write_bytes.go
inAppendInt()
for thetime.Duration
type which I support for was "added" in https://github.com/tinylib/msgp/pull/311.