As I mentioned yesterday, we're trying to track down a mysterious logout issue at InVision. Part of this investigation involves trying to understand w

Including Tracing Headers In Nginx 1.18.0 Access Logs Using Custom Formatting

submited by
Style Pass
2021-05-27 19:00:02

As I mentioned yesterday, we're trying to track down a mysterious logout issue at InVision. Part of this investigation involves trying to understand where an even more mysterious 502 Bad Gateway error is coming from. Due to the many layers of our network, it's proving difficult to figure out which "network hop" is failing. Yesterday, I looked at adding tracing headers to Amazon's ALB using X-Amzn-Trace-Id. Today, I want to look at adding tracing headers to the access logs in Nginx 1.18.0 using a custom log format.

CAUTION: I don't know very much about how nginx works. Nor do I know very much about configuring nginx. What I talk about in this post is just enough to get the tracing working. Please take this all with a grain of salt.

At the end of the day, what I want to see is a series of log entries that all have the same RequestID. Then, be able to take that evidence to our SREs (Site Reliability Engineers) to help understand why the request is failing at a particular layer.

I've already added the tracing headers to our ALB (Application Load Balancer); and, I've already added some access tracing logic in our ColdFusion applications; but, between the ALB and ColdFusion is:

Leave a Comment