在Traefik中,是否可以向请求添加唯一的请求ID标头?我希望能够将访问日志与后端服务的日志相关联。
答案 0 :(得分:0)
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"
...