SpanId changes on WebClient request
See original GitHub issueI am doing a simple HTTP request with WebClient, and the spanId is changing.
I noticed that this doesn’t happen in Finchley.RELEASE
, but is happening on Greenwich.SR2
I have the following code:
restTemplate.getForObject(
"https://github.com",
String::class.java
)
logger.info("no spanId changes")
webClient.get()
.uri("https://github.com")
.retrieve()
.bodyToMono(String::class.java)
.block()
logger.info("spanId changed!")
Example output:
[c177ebd3831cc307-c177ebd3831cc307] no spanId changes
[c177ebd3831cc307-bcdfe282f4b59a0c] spanId changed!
Full project: https://github.com/gabriel-cardenete-movile/sleuth-webclient-problem
Am I doing something wrong here?
Thanks in advance!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:11 (7 by maintainers)
Top Results From Across the Web
traceId / spanId generated are changed post WebClient call
The traceId / spanId generated are getting changed post the WebClient call. Spring Boot v2.6.1 and Spring Cloud v3.1.0. How do we retain...
Read more >traceId / spanId generated are changed post WebClient call
The traceId / spanId generated are getting changed post the WebClient call. Spring Boot v2.6.1 and Spring Cloud v3.1.0.
Read more >Spring Boot and Tracing Calls - The Blog of Ivan Krizsan
The span id changes to fd05218e6d683af9 when execution enters the service layer in the application. There is only one log statement in which ......
Read more >Spring Cloud Sleuth Features
This section dives into the details of Spring Cloud Sleuth. Here you can learn about the key features that you may want to...
Read more >spring-cloud/spring-cloud-sleuth - Gitter
However, when I make a call from the controller to another controller (via ... the new spanId when using WebClient but the request...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ll investigate it once I have some spare time.
Should be fixed via https://github.com/spring-cloud/spring-cloud-sleuth/issues/1516