Skip to content

Commit c907bec

Browse files
committed
Reference context propagation from correlation ID documentation
Also links from the logging documenttaion to the correlation ID documentation. Closes gh-42054
1 parent 861e520 commit c907bec

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/observability.adoc

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ NOTE: Low cardinality tags will be added to metrics and traces, while high cardi
1414
Beans of type `ObservationPredicate`, `GlobalObservationConvention`, `ObservationFilter` and `ObservationHandler` will be automatically registered on the `ObservationRegistry`.
1515
You can additionally register any number of `ObservationRegistryCustomizer` beans to further configure the registry.
1616

17-
Observability support relies on the https://github.com/micrometer-metrics/context-propagation[Context Propagation library] for forwarding the current observation across threads and reactive pipelines.
18-
By default, `ThreadLocal` values are not automatically reinstated in reactive operators.
19-
This behavior is controlled with the configprop:spring.reactor.context-propagation[] property, which can be set to `auto` to enable automatic propagation.
20-
21-
For more details about observations please see the {url-micrometer-docs}/observation[Micrometer Observation documentation].
22-
2317
TIP: Observability for JDBC can be configured using a separate project.
2418
The https://github.com/jdbc-observations/datasource-micrometer[Datasource Micrometer project] provides a Spring Boot starter which automatically creates observations when JDBC operations are invoked.
2519
Read more about it https://jdbc-observations.github.io/datasource-micrometer/docs/current/docs/html/[in the reference documentation].
@@ -29,6 +23,16 @@ To enable it, add the `io.r2dbc:r2dbc-proxy` dependency to your project.
2923

3024

3125

26+
[[actuator.observability.context-propagation]]
27+
== Context Propagation
28+
Observability support relies on the https://github.com/micrometer-metrics/context-propagation[Context Propagation library] for forwarding the current observation across threads and reactive pipelines.
29+
By default, `ThreadLocal` values are not automatically reinstated in reactive operators.
30+
This behavior is controlled with the configprop:spring.reactor.context-propagation[] property, which can be set to `auto` to enable automatic propagation.
31+
32+
For more details about observations please see the {url-micrometer-docs}/observation[Micrometer Observation documentation].
33+
34+
35+
3236
[[actuator.observability.common-tags]]
3337
== Common Tags
3438

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/tracing.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ logging:
9393
NOTE: In the example above, configprop:logging.include-application-name[] is set to `false` to avoid the application name being duplicated in the log messages (configprop:logging.pattern.correlation[] already contains it).
9494
It's also worth mentioning that configprop:logging.pattern.correlation[] contains a trailing space so that it is separated from the logger name that comes right after it by default.
9595

96+
TIP: Correlation IDs rely on context propagation.
97+
Please read xref:reference:actuator/observability.adoc#actuator.observability.context-propagation[this documentation for more details].
98+
9699

97100

98101
[[actuator.micrometer-tracing.propagating-traces]]

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/logging.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ TIP: If you have a configprop:spring.application.name[] property but don't want
4747

4848
TIP: If you have a configprop:spring.application.group[] property but don't want it logged you can set configprop:logging.include-application-group[] to `false`.
4949

50+
TIP: For more details about correlation IDs, please xref:reference:actuator/tracing.adoc#actuator.micrometer-tracing.logging[see this documentation].
51+
5052

5153

5254
[[features.logging.console-output]]

0 commit comments

Comments
 (0)