spring-framework/framework-docs/modules/ROOT/pages/integration
Brian Clozel f5a356c9c6 Add ContextPropagatingTaskDecorator
Prior to this commit, `@Async` and `@EventListener` annotated methods
would lose the the logging and observation contexts whenever their
execution was scheduled on a different Thread.

The Context Propagation library supports this use case and can propagate
context values in ThreadLocals, Reactor Context and more.

This commit introduces a new `TaskDecorator` implementation that
leverages the Context Propagation library. When configured on a
`TaskExecutor`, this allows to properly propagate context value through
the execution of the task.

This implementation is completely optional and requires the
"io.micrometer:context-propagation" library on the classpath. Enabling
this feature must be done consciously and sometimes selectively, as
context propagation introduces some overhead.

Closes gh-31130
2023-08-29 11:21:47 +02:00
..
cache Show example for CaffeineCacheManager async cache setup 2023-08-21 15:39:02 +02:00
jms Remove outdated documentation references to WebLogic/WebSphere 2023-08-12 14:50:45 +02:00
jmx Explicit note on FactoryBean resolution with MBeanExporter 2023-08-08 20:11:28 +02:00
appendix.adoc Trim IDs with parent 2023-05-04 15:35:05 +01:00
cache.adoc Enable Section Summary TOC for small pages 2023-05-04 15:35:05 +01:00
checkpoint-restore.adoc Rename checkpoint property to "spring.context.checkpoint" 2023-06-13 19:06:46 +02:00
email.adoc Fix cross references 2023-05-04 15:35:05 +01:00
jms.adoc Split files 2023-05-04 15:35:05 +01:00
jmx.adoc Fix cross references 2023-05-04 15:35:05 +01:00
observability.adoc Add ContextPropagatingTaskDecorator 2023-08-29 11:21:47 +02:00
rest-clients.adoc Revise docs for server use of `@HttpExchange` 2023-08-04 18:21:42 +03:00
scheduling.adoc Polishing 2023-07-27 21:47:54 +02:00