Skip to content

Improper child relationships with WebClient #1516

@MarkRobbo

Description

@MarkRobbo

Describe the bug
When WebClient requests are made and blocked to retrieve a result, subsequent calls are each parents of the previous request.

Now RestTemplate is being deprecated (https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/client/RestTemplate.html) it is becoming very common to include both web and webflux dependencies in the classpath and use WebClient as suggested by Spring to make blocking calls like this instead. Web takes priority for Servlet based applications.

In this case it becomes impossible to follow traces as every one is nested, especially between services.

Sample
Demo at https://github.com/MarkRobbo/cloud-schema-bug

I would expect to see these spans created by hitting /call happen one after another (each being s child of the first), but they are nested inside each other:

Screenshot of Zipkin

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions