且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何向 Traefik 添加唯一的请求 ID 标头

更新时间:2022-06-10 23:07:35

AFAIK 不支持它,但这是 Traefik 2.3.6 中的一个功能性解决方法:

AFAIK there is no support for it, however here is a funcional workaround in 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"

...