Spring WebClient tracing issue
See original GitHub issueHi! I am trying to set-up tracing for a stateless GraphQL api-gateway (simple HttpServlet), which accepts requests at POST /graphql
. The gateway makes use of WebClient in order to call another service for retrieving data.
The problem I am facing is that both the /graphql
, as well as the endpoints the api-gateway is calling are showing up in the resource list displayed in Datadog.
I have extracted the information on the traces below:
DDSpan [ t_id=6496705132716908527, s_id=3252327453084076151, p_id=0] trace=api-gateway/servlet.request/POST /graphql metrics={} tags={component=java-web-servlet, http.method=POST, http.url=http://localhost:9090/graphql, runtime-id=6407f4f3-21b7-4314-8b4e-6c50e1125e82, span.kind=server, span.origin.type=org.apache.catalina.core.ApplicationFilterChain, thread.id=63, thread.name=http-nio-9090-exec-10}, duration_ns=0
DDSpan [ t_id=7417067946456931379, s_id=5348444464491720869, p_id=0] trace=api-gateway/netty.client.request/GET /books/?/author metrics={} tags={component=netty-client, http.method=GET, http.status_code=200, http.url=http://localhost:8060/books/12345/author, peer.hostname=localhost, peer.port=8060, runtime-id=6407f4f3-21b7-4314-8b4e-6c50e1125e82, span.kind=client, thread.id=28, thread.name=reactor-http-nio-4}, duration_ns=50383986
It seems that the async WebClient
request is not properly linked to the initial request.
The issue I am experiencing seems very similar to the one described here: https://github.com/htmldoug/datadog-netty4-failing/pull/1.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Logging Spring WebClient Calls - Baeldung
In this tutorial, we are going to show how to customize Spring's WebClient – a reactive HTTP client – to log requests and...
Read more >Tutorial | Metrics and Tracing with Spring
Distributed tracing helps you quickly pinpoint the source of an issue in your distributed system. The tradeoff is that, at high volumes and...
Read more >Spring Webflux Webclient: Issue with wiretap logging
logging.level.reactor.netty.http.client.HttpClient = INFO Have you tried setting the logging level specifically for the package? – Squiggs.
Read more >spring-cloud/spring-cloud-sleuth - Gitter
package com.example.spring.webclient.autoconfiguration; import brave. ... Hi, I'm having some issues propagating Sleuth tracing correctly with Reactor ...
Read more >Tracing a Reactive Kotlin App with Spring Cloud Sleuth
Messaging like Kafka or RabbitMQ; HTTP headers via WebMVC and WebFlux controllers; Request headers made through WebClient , and RestTemplate. Demo Application.
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 created PR #831 to add support for WebClient. It’s still rough around the edges but it’s a start. Hope this is enough to speed things up.
This is included in https://github.com/DataDog/dd-trace-java/releases/tag/v0.31.0