-
Notifications
You must be signed in to change notification settings - Fork 264
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
Tracing not working for LogbookClientHandler #1512
Comments
Related to #1513 ? |
I have the same issue. Checkout my sample here on the issues/reactor-netty branch. |
You set log pattern to get the
And then expect them to be added to the log lines of Logbook (red boxes below, where they are empty): However, notice that green boxes in the above figure: They show that Logbook is being executed from a separate thread called The important point to note, from Logback documentation (Logback is an implementation of SLF4J API, and is used behind the scenes by Logbook):
So, here is what happens:
This article might be helpful: https://ttddyy.github.io/mdc-with-webclient-in-webmvc/ Pay special attention to Spring Boot 3 section. Hope this helps! |
Description
The LogbookClientHandler in Spring Boot 3 is not printing trace IDs when logging requests and responses using the LogbookClientHandler.
Expected Behavior
The logbook instance passed to LogbookClientHandler should log the trace and span ids.
Actual Behavior
The logs are printing empty/blank values.
![image](https://private-user-images.githubusercontent.com/10570559/241652108-c27b0556-519a-4232-b875-8bf284a86b46.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3NzUwNzIsIm5iZiI6MTczOTc3NDc3MiwicGF0aCI6Ii8xMDU3MDU1OS8yNDE2NTIxMDgtYzI3YjA1NTYtNTE5YS00MjMyLWI4NzUtOGJmMjg0YTg2YjQ2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDA2NDYxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJmMWRmZTdkMjY4NGM0M2UyZjMxYmIyMjIzNjVmYmJmNjlmYTUxNjUzYWU0NjA4NTQ3ODRlZDM1NTQ0MDE5YzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.HzOk-LQfCG3f6S2UPdXyi5CGQEvsDjNK9DTZpO2DLGI)
The below project can be referred
https://github.com/rajapanda15/Springboot3-Logbook.git
The text was updated successfully, but these errors were encountered: