question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SpanId changes on WebClient request

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
marcingrzejszczakcommented, Aug 16, 2019

I’ll investigate it once I have some spare time.

0reactions
marcingrzejszczakcommented, Jan 13, 2020
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found