Reference context propagation from correlation ID documentation

Also links from the logging documenttaion to the correlation ID
documentation.

Closes gh-42054
This commit is contained in:
Moritz Halbritter
2024-09-06 14:38:34 +02:00
parent 861e5209ef
commit c907bec434
3 changed files with 15 additions and 6 deletions

View File

@@ -14,12 +14,6 @@ NOTE: Low cardinality tags will be added to metrics and traces, while high cardi
Beans of type `ObservationPredicate`, `GlobalObservationConvention`, `ObservationFilter` and `ObservationHandler` will be automatically registered on the `ObservationRegistry`.
You can additionally register any number of `ObservationRegistryCustomizer` beans to further configure the registry.
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.
By default, `ThreadLocal` values are not automatically reinstated in reactive operators.
This behavior is controlled with the configprop:spring.reactor.context-propagation[] property, which can be set to `auto` to enable automatic propagation.
For more details about observations please see the {url-micrometer-docs}/observation[Micrometer Observation documentation].
TIP: Observability for JDBC can be configured using a separate project.
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.
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.
[[actuator.observability.context-propagation]]
== Context Propagation
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.
By default, `ThreadLocal` values are not automatically reinstated in reactive operators.
This behavior is controlled with the configprop:spring.reactor.context-propagation[] property, which can be set to `auto` to enable automatic propagation.
For more details about observations please see the {url-micrometer-docs}/observation[Micrometer Observation documentation].
[[actuator.observability.common-tags]]
== Common Tags

View File

@@ -93,6 +93,9 @@ logging:
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).
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.
TIP: Correlation IDs rely on context propagation.
Please read xref:reference:actuator/observability.adoc#actuator.observability.context-propagation[this documentation for more details].
[[actuator.micrometer-tracing.propagating-traces]]

View File

@@ -47,6 +47,8 @@ TIP: If you have a configprop:spring.application.name[] property but don't want
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`.
TIP: For more details about correlation IDs, please xref:reference:actuator/tracing.adoc#actuator.micrometer-tracing.logging[see this documentation].
[[features.logging.console-output]]