Repository navigation
[STO-928] Return X-Trace-ID on every response and pin the OTel module - #29
Merged
Merged
Conversation
add_header without 'always' only applies to 200, 201, 204, 206 and 3xx responses, so 202s and every error response went out without a trace ID. nginx-module-otel was installed unpinned from the nginx mainline repo. Its latest build depends on nginx 1.31.6, which upgraded nginx past the 1.31.3 source the headers-more module is compiled against, so a fresh build of master fails to start.
Spence1115
marked this pull request as ready for review
October 9, 2026 18:09
zacblazic
approved these changes
Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Responses from apps behind the proxy only carried
X-Trace-IDon 2xx/3xx success codes, so a failed request, or an async one answered with202, gave you no trace ID to look up. Those are the requests we most need to follow into Grafana and Sentry.Summary
add_headerwithoutalwaysonly applies to 200, 201, 204, 206, 301, 302, 303, 304, 307 and 308. Seen on data-stories production:GET /web_api/stories/:id(200) returnedx-trace-id, butPOST /web_api/stories/customer_async(202) didn't, although nginx traced that request. Addingalwaysputs the header on every response.The Dockerfile change unblocks the release. Rebuilding
mastertoday produces an image that won't start:[emerg] module "ngx_http_headers_more_filter_module.so" version 1031003 instead of 1031006, the same failure #26 hit.nginx-module-otelwas installed unpinned from nginx's mainline apt repo. Its newest build depends onnginx-r1.31.6, which upgrades nginx past the 1.31.3 source the headers-more module is compiled against. The published1.31.3image predates the 1.31.6 packages, so it's unaffected. CI only builds the image, so it doesn't catch this. Pinning the module to the base image'sNGINX_VERSIONkeeps nginx, the OTel module and headers-more on one version, and future base-image upgrades move all three together.Details
Checked locally with a test
app.confproxying toreturn 200/202/404/500locations:master, rebuilt todaymasterbuilt against the 1.31.6 sourceThe
X-Proxy-*latency headers have the same success-only limitation. I've left them as they are, since nobody has needed them on errors.To roll out: tag
1.31.3-1, then bumpzappi/nginx-proxy:1.31.3in shipyard (pkg/configpack/manifest_component.go), which pins the sidecar for every app.https://linear.app/zappi/issue/STO-928