在Traefik中,是否可以向请求添加唯一的Request ID标头?我希望能够将访问日志与后端服务的日志关联起来。
AFAIK 不支持它,但是 Traefik 2.3.6 中有一个功能解决方法:
# static config
...
[tracing]
# Workaround for the non support of Correlation/Request Id Header
# - https://github.com/traefik/traefik/issues/4640
# - https://github.com/traefik/traefik/pull/6707#issuecomment-640429009
[tracing.jaeger]
samplingParam = 0
traceContextHeaderName = "X-Correlation-Id"
...
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1081 次 |
| 最近记录: |