问题
I want to remove X-Span-Export":"true","X-B3-SpanId":"40bcdc1c4fcdb9c0","X-B3-TraceId":"40bcdc1c4fcdb9c0"}
form my log .
I have added below configuration to application.yml but no help.
Application.yml
spring: application: name: app-name profiles: dev sleuth: sampler: probability : 1.0 log: slf4j: whitelisted-mdc-keys: principal baggage-keys: principal
JSON Log
{"@timestamp":"2020-12-02T13:58:35.343+03:00","@version":"1","message":"Request {}helloChasis from chasis-ms","logger_name":"az.iba.ms.chasis.controller.ChasisController","thread_name":"http-nio-8080-exec-1","level":"INFO","level_value":20000,"traceId":"40bcdc1c4fcdb9c0","spanId":"40bcdc1c4fcdb9c0","spanExportable":"true","X-Span-Export":"true","X-B3-SpanId":"40bcdc1c4fcdb9c0","X-B3-TraceId":"40bcdc1c4fcdb9c0"}
回答1:
Just set your own logging.pattern.level
where you will define your own logging pattern. If you have one then you'll override the default Sleuth one.
来源:https://stackoverflow.com/questions/65106794/how-to-remove-x-b3-prefix-form-sleuth-logs