Skip to content

spring boot jaeger won't trace webClient request #149

Description

@emoleumassi

I have a Spring boot application and i want to trace the webClient request with jaeger:

implementation "io.micrometer:micrometer-registry-prometheus:1.10.3"
implementation "org.springframework.boot:spring-boot-starter-web:2.6.6"
implementation "org.springframework.boot:spring-boot-starter-webflux:2.6.6"
implementation 'io.opentracing.contrib:opentracing-spring-jaeger-web-starter:3.3.1'
implementation "io.opentracing.contrib:opentracing-jdbc:0.2.15"

My application.yml:

server:
  port: 4502
spring:
   application:
    name: myServiceName
  datasource:
    url: jdbc:tracing:sqlserver:xxxx
    username: sssr
    password: blabla
    driver-class-name: io.opentracing.contrib.jdbc.TracingDriver 

opentracing:
  jaeger:
    enabled: true
    service-name: myServiceName
    log-spans: true
    udp-sender:
      port: 31683
      host: a.b.asd.wq
    http-sender:
      url: http://a.b.asd.wq:31268/api/traces

my webClient request:

String response = webClient.get()
                                    .uri(url)
                                    .retrieve()
                                    .bodyToMono(String.class)
                                    .block();

i send a request to http://127.0.0.1:4502/ and i got some spans reported

2023.02.22 10:02:54.350 [http-nio-4502-exec-1] INFO  i.j.i.reporters.LoggingReporter:43 - Span reported: 7d0aef60d1f97f02:7d0aef60d1f97f02:0:1 - GET

The Jaeger UI on the host can the webClient request not reported.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions