Skip to content

Commit 6060635

Browse files
committed
Document trace propagation with RestTemplate and WebClient
Closes gh-34053
1 parent fa72f90 commit 6060635

File tree

1 file changed

+7
-0
lines changed
  • spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator

1 file changed

+7
-0
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/tracing.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ Press the "Show" button to see the details of that trace.
6767

6868
TIP: You can include the current trace and span id in the logs by setting the configprop:logging.pattern.level[] property to `%5p [${spring.application.name:},%X{traceId:-},%X{spanId:-}]`
6969

70+
[[actuator.micrometer-tracing.propagating-traces]]
71+
=== Propagating Traces
72+
73+
To automatically propagate traces over the network, use the auto-configured <<io#io.rest-client.resttemplate, `RestTemplateBuilder`>> or <<io#io.rest-client.webclient, `WebClient.Builder`>> to construct the client.
74+
75+
WARNING: If you create the `WebClient` or the `RestTemplate` without using the auto-configured builders, automatic trace propagation won't work!
76+
7077

7178

7279
[[actuator.micrometer-tracing.tracer-implementations]]

0 commit comments

Comments
 (0)