Skip to content

Commit 28fe988

Browse files
committed
Document MDC propagation library.
1 parent 581be14 commit 28fe988

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

mdc-propagation/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[![Released Version][maven-img]][maven]
2+
3+
# Slf4J MDC propagation library
4+
5+
Adding the `mdc-propagation` jar to your classpath
6+
is all that is needed to automatically let the [MDC]
7+
from [Slf4J] become part of the `ContextSnapshot`.
8+
9+
## How to use this library
10+
11+
Add it to your classpath.
12+
```xml
13+
<dependency>
14+
<groupId>nl.talsmasoftware.context</groupId>
15+
<artifactId>mdc-propagation</artifactId>
16+
<version>[see maven-central version above]</version>
17+
</dependency>
18+
```
19+
20+
Done!
21+
22+
Now the `MDC.getCopyOfContextMap()` is propagated into each
23+
snapshot created by the `ContextManagers.createSnapshot()` method.
24+
This includes all usages of the `ContextAwareExecutorService`.
25+
26+
27+
[maven-img]: https://img.shields.io/maven-central/v/nl.talsmasoftware.context/mdc-propagation.svg
28+
[maven]: http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22nl.talsmasoftware.context%22%20AND%20a%3A%22mdc-propagation%22
29+
30+
[slf4j]: https://www.slf4j.org/
31+
[mdc]: https://www.slf4j.org/api/org/slf4j/MDC.html

opentracing-span-propagation/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ Add it to your classpath.
2121
Done!
2222

2323
Now the `GlobalTracer.getActiveSpan()` is propagated into each
24-
background thread you start with the `ContextAwareExecutorService`.
24+
snapshot created by the `ContextManagers.createSnapshot()` method.
25+
This includes all usages of the `ContextAwareExecutorService`.
2526

2627

2728
[maven-img]: https://img.shields.io/maven-central/v/nl.talsmasoftware.context/opentracing-span-propagation.svg

0 commit comments

Comments
 (0)