Hi.
I have a custom error type (which implements Error interface) and use it in log.Error
When I was looking at this error through jaeger-ui, I see it is not the err.Error() I see, but the struct representation.
this may be the culprit of this issue
func (lf Field) String() string {
return fmt.Sprint(lf.key, ":", lf.Value())
}
Sprint doesn't call the Error() method if the actual interface is an error, but a struct representation. as I see here
I am not sure Marshal formats it differently, but as far as I see, my trace log doesn't have some of the private info I add through Error method.
Please guide me if you think it may be because I use the API wrongly.
fields := []log.Field {log.Error(myCustomError)}
fields = append(fields, log.String("message", msg))
fields = append(fields, log.String("level", "info"))
span := opentracing.SpanFromContext(ctx)
span.LogFields(fields...)