opentracing-contrib / java-spring-cloud

Distributed tracing for Spring Boot, Cloud and other Spring projects
Apache License 2.0
390 stars 143 forks source link

Fix span logs and tags while logging with level ERROR #328

Open xbj110825 opened 3 years ago

xbj110825 commented 3 years ago

While using SpanLogsAppender, we found that while logging with level ERROR, the span log event's value is something like io.opentracing.tag.BooleanTag@7251412f. So i search the behavior of other components(e.g. io.opentracing.contrib.jdbc.JdbcTracingUtils.onError), and found that we should log Tag.ERROR.getKey() instead of Tag.ERROR, and tag error.