Rename headers to header.

This commit is contained in:
Stephan Schnabel 2021-12-13 14:06:59 +01:00
parent 0edd98d7a4
commit 7403b04efd
Signed by: stephan.schnabel
GPG key ID: F74FE2422AA07290
5 changed files with 43 additions and 43 deletions

View file

@ -0,0 +1,28 @@
# Add HTTP headers to MDC
## Properties
Property | Description | Default
-------- | ----------- | -------
`logger.http.header.enabled` | filter enabled? | `true`
`logger.http.header.path` | filter path | `/**`
`logger.http.header.order` | order for [Ordered](https://github.com/micronaut-projects/micronaut-core/blob/v3.2.0/core/src/main/java/io/micronaut/core/order/Ordered.java) | [ServerFilterPhase.FIRST.before()](https://github.com/micronaut-projects/micronaut-core/blob/v3.2.0/http/src/main/java/io/micronaut/http/filter/ServerFilterPhase.java#L34)
`logger.http.header.prefix` | prefix to MDC key | ``
`logger.http.header.names` | http header names to add to MDC | `[]`
## Examples
Configuration for b3-propagation:
```yaml
logger:
http:
header:
prefix: header.
names:
- x-request-id
- x-b3-traceId
- x-b3-parentspanid
- x-b3-spanid
- x-b3-sampled
```