opentracing-contrib / java-spring-jaeger

Apache License 2.0
256 stars 95 forks source link

log4j support #96

Open seho-kim-do-something opened 4 years ago

seho-kim-do-something commented 4 years ago

Hi, I am new to Jaeger, and need some help on how to make span reported with logs. With logback, I see spans with logs including application logs from the UI, but with log4j2 it doesn't get any log messages. Is there any way to work with log4j2? Thanks, Seho

kfirfer commented 4 years ago

Im facing the same problem, i could see a open PR here: https://github.com/opentracing-contrib/java-spring-jaeger/pull/60

pavolloffay commented 4 years ago

Are you using logging reporter? The implementation is using slf4j https://github.com/jaegertracing/jaeger-client-java/blob/master/jaeger-core/src/main/java/io/jaegertracing/internal/reporters/LoggingReporter.java. The issue is probably a configuration on your side.

the #60 is adding trace IDs into MDC it does not log span content (operation name, time...)

lichenglin commented 4 years ago

I have found that we already have MDCScopeManager.

What we should do is likely just put MDCScopeManager in JaegerAutoConfiguration.

This way maybe better.

Do we have any plan to update jaeger client from version '1.1.0' to '1.3.2'?

since MDCScopeManager is a new feature, not included in 1.1.0.

I think this issue is same as #49

benkn commented 4 years ago

I saw #60 was closed and not merged, is there a reason? Would be nice to have that feature added

pavolloffay commented 4 years ago

The reason is mentioned in https://github.com/opentracing-contrib/java-spring-jaeger/pull/60#issuecomment-664165735 - the MDC support is directly in Jaeger. Could somebody open a PR to configure the scope manager?

lichenglin commented 4 years ago

The reason is mentioned in #60 (comment) - the MDC support is directly in Jaeger. Could somebody open a PR to configure the scope manager?

Does java-spring-jaeger has any plan to update the jaeger-client version from 1.1 to 1.3+?

Since MDCScopeManager is new feature in jaeger-client v1.3+

geoand commented 4 years ago

Hopefully soon

davebarda commented 3 years ago

@geoand , don't want to push, but any updates here? can I help somehow?

geoand commented 3 years ago

@pavolloffay do you know what the status of the Jaeger client is? Should we update to the latest?