Rename headers to header.
This commit is contained in:
parent
0edd98d7a4
commit
7403b04efd
5 changed files with 43 additions and 43 deletions
28
docs/features/http_mdc_header.md
Normal file
28
docs/features/http_mdc_header.md
Normal 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
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue