Working on Spring Boot 3.1 project and using the B3_MULTI propagation strategy, I am observing the following behavior :

  • On each request received Micrometer creates a new Span and each log written contains the new SpanID. Should not be the request SpanID logged here ?
  • On each request sent by the server to another API with RestTemplate, Micrometer creates a new Span and use the created span's ID in the header X-B3-spanID. Here the behavior looks pretty logical to me.

What's worrying me is that if the server is logging the new SpanID as soon as it receives the request, what's the purpose to get a SpanId in this request ?

Example using this application.yml configuration :

management:
  tracing:
    propagation:
      type: B3_MULTI

and calling my Spring Boot 3.1 API with postman and using these headers :

X-B3-SpanId: 97552541f44c6a8e X-B3-TraceId: affca7de79bdf483

My app log contains :

... affca7de79bdf483 | 5631f587ff130771 ...

where 5631f587ff130771 is a new SpanID

0

There are 0 best solutions below