How to remove X-B3 prefix form Sleuth logs

微笑、不失礼 提交于 2021-02-11 15:06:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!