Jeff 其实跟 skywalking 没关系 = = skywalking 传的 uuid 是标准的 rfc4122 uuid
我测得时候只是用了 nginx 他自己的规则 $req_id 这个变量
http {
...
map $http_x_request_id $req_id {
default $http_x_request_id;
"" $request_id;
}
...
server {
listen 80;
server_name *.dev.ks.example.com;
access_log /var/log/nginx/dev_access.log upstreaminfo;
error_log /var/log/nginx/dev_error.log;
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Request-ID $req_id;
proxy_http_version 1.1;
proxy_pass http://kubesphere-router-http;
}
}
}