Skip to content

Instantly share code, notes, and snippets.

@eoftedal
Last active April 20, 2020 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eoftedal/bd306da6e060419a04847f3db3f36d0a to your computer and use it in GitHub Desktop.
Save eoftedal/bd306da6e060419a04847f3db3f36d0a to your computer and use it in GitHub Desktop.
Automatically adding forwarded/created x-b3-traceid to proxy_pass in nginx
map $http_x_b3_traceid $b3traceid {
"~^(?<traceid>[a-f0-9]{32})$" $traceid;
default $request_id;
}
proxy_set_header x-b3-traceId $b3traceid;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment