-
Notifications
You must be signed in to change notification settings - Fork 784
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
trace information lost after spring cloud 2021.0.6 update #2270
Comments
Hey! I've asked to you create this issue in spring cloud gcp. Why have you created it here? |
Hi, because I don't think that the problem is within spring cloud gcp. In my sample project we have the following dependencies:
With this version everything works. When update to the following sping cloud version, which includes an update of spring-cloud-sleuth from version
As you can see we did not update spring-cloud-gcp at all and only updated spring-cloud-dependencies, which in turn includes an update of sleuth. We think something changed in the tracing of spring cloud sleuth. |
Hi,
As far as i can see there were some commits added in |
Hi, anyone an idea here, this somehow block us. The example I have provided demonstrates the problem in a very simple way, our real world problem is of more importance. We are losing access logs in our services because of this, which is a serious problem for us, any help would be appreciated. |
If we have time to look into that and idea how to solve this then we'll update the issue. |
Hi @OlegDokuka , Route class: And a handler class public Mono helloWorld(ServerRequest request) { If I run the application, and hit the following url "http://localhost:8080/helloWorld/1", here is the application log, 2023-05-23 18:11:41.911 TRACE [,,] 12100 --- [ctor-http-nio-2] o.s.w.s.adapter.HttpWebHandlerAdapter : [219e5b8d-1] HTTP GET "/helloWorld/start", headers={masked} The last log line is missing the traceId. This is a scenario of OnComplete. 2023-05-23 18:12:03.045 TRACE [,,] 12100 --- [ctor-http-nio-4] o.s.w.s.adapter.HttpWebHandlerAdapter : [e3f64717-2] HTTP GET "/helloWorld/1", headers={masked} java.lang.RuntimeException: path should contain some value As you can see above (highlighted in Italics ), the traceId is missing, when the exception is thrown. If I change the following in pom file and restart the application, then for positive scenario, I could see the traceId propagated during onComplete. (TraceId marked in In Bold) 2023-05-23 18:09:37.110 TRACE [,,] 19444 --- [ctor-http-nio-2] o.s.w.s.adapter.HttpWebHandlerAdapter : [fd841721-5] HTTP GET "/helloWorld/test", headers={masked} Similarly for the error scenario, 2023-05-23 18:10:15.946 TRACE [,,] 19444 --- [ctor-http-nio-4] o.s.w.s.adapter.HttpWebHandlerAdapter : [d738a83e-6] HTTP GET "/helloWorld/1", headers={masked} 2023-05-23 18:10:15.951 DEBUG [,cafe29d9a35fd3bc,cafe29d9a35fd3bc] 19444 --- [ctor-http-nio-4] org.springframework.web.HttpLogging : [d738a83e-6] Writing " Clearly, here as well, the traceId and spanId were propagated to OnError condition, while using spring-cloud-starter-sleuth:3.1.5 The concern here is, the feature which was working in version 3.1.5 is broken in subsequent versions (3.1.6 and above). Even in the git code shared by @oemergenc 's still throws error when sleuth is pointed to version 3.1.6 and above. Appreciate, if you look into the issue and let us know if you require any further details. |
Hi, indeed it seems the problem is still there. I have updated my Repo to include a test scenario where an error occurs in a rest endpoint. While the test a running fine on the main branch broken branch |
Can we mark the issue as "reopened"? |
Created a new issue to track, #2292 |
Describe the bug
We experience a problem with our trace information after updating to spring cloud 2021.0.6.
We are using spring-cloud-gcp-logging for trace information and after the update to spring cloud 2021.0.6 we are losing the trace information for some logs.
Sample
I have created a very simple test application, see here:
https://github.com/oemergenc/spring-cloud-tracing-problem
There are two branches:
main
branch uses spring cloud 2021.0.5 and thebroken
branch uses 2021.0.6. There is also a very simple test which runs successfully on themain
branch and fails on thebroken
branch. It would be nice if you could have look at this, since I have no idea where trace information is lost. The test is here:https://github.com/oemergenc/spring-cloud-tracing-problem/blob/main/src/test/java/com/example/tracing/problem/tracing/ReactiveLoggingIntegrationTest.java
If you need more infos about the sample project, let me know. It includes a simple webfilter which logs some statements.
Thanks in advance
The text was updated successfully, but these errors were encountered: