Adds "extra fields" but at process scope (#1424)

* Adds "extra fields" but at process scope

fixes gh-1421

* Added changes following the review

* Added changes following the review

* Added changes following the review
This commit is contained in:
Marcin Grzejszczak
2019-08-16 13:42:27 +02:00
committed by GitHub
parent 40a5333e56
commit 289ec4755e
5 changed files with 43 additions and 3 deletions

View File

@@ -446,9 +446,10 @@ String countryCode = ExtraFieldPropagation.get(span.context(), "x-country-code")
```
IMPORTANT: A difference from previous versions of Sleuth is that, with Brave, you must pass the list of baggage keys.
There are two properties to achieve this.
There are the following properties to achieve this.
With the `spring.sleuth.baggage-keys`, you set keys that get prefixed with `baggage-` for HTTP calls and `baggage_` for messaging.
You can also use the `spring.sleuth.propagation-keys` property to pass a list of prefixed keys that are whitelisted without any prefix.
You can also use the `spring.sleuth.propagation-keys` property to pass a list of prefixed keys that are propagated to remote services without any prefix.
You can also use the `spring.sleuth.local-keys` property to pass a list keys that will be propagated locally but will not be propagated over the wire.
Notice that there's no `x-` in front of the header keys.
In order to automatically set the baggage values to Slf4j's MDC, you have to set