Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogSpanHandler uses JUL logging #1342

Open
mpb7h opened this issue Aug 22, 2022 · 1 comment
Open

LogSpanHandler uses JUL logging #1342

mpb7h opened this issue Aug 22, 2022 · 1 comment
Labels

Comments

@mpb7h
Copy link

mpb7h commented Aug 22, 2022

Describe the Bug

We have applications which currently are not sending traces to an endpoint (by design - right now we just want traceIds in our logs for correlating requests). When no reporters are configured, the LogSpanHandler is attached by default. This handler uses JUL logging at an INFO level to log the span. The default JRE logging configuration means that these messages are printed to stdout.

This is problematic - unless we explicitly now include a logging.properties file and ensure it's loaded in our code, we get logs from this handler for every request which do not honour the log format of the rest of our application logging.

Steps to Reproduce

Create a basic Micronaut application as per https://guides.micronaut.io/latest/micronaut-microservices-distributed-tracing-zipkin-gradle-kotlin.html, but remove the http configuration

Expected Behaviour

There are two possibilities here:

  • Use a logging facade so that log messages from the library honour my own logging configuration
  • Log at DEBUG level, so traces are not logged by default
@mpb7h mpb7h added the bug label Aug 22, 2022
@mpb7h
Copy link
Author

mpb7h commented Aug 22, 2022

FYI I realised that I can set the sampler probability to zero (`tracing.zipkin.sampler.probability' in Micronaut terms) to get the behaviour that I want, but the original point still stands I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant