Using the “X-AMZN-Trace-Id” Header for Request Tracing Through AWS Load Balancer
bennadel.com
bennadel.com
https://github.com/discourse/prometheus_exporter/pull/150
What's annoying about the encoded time value is version 1 (the only version still) is in seconds precision. Makes the value non-viable for any sort of queue time metric. Better than nothing, but would have been nice if it were micro.
https://docs.aws.amazon.com/elasticloadbalancing/latest/appl...
The format for the field is
X-Amzn-Trace-Id: Field=version-time-id
and you're allowed to add custom fields that don't follow this format and they will be preserved.If you extract this trace id and use it as your request id you can follow it from the load balancer all the way to the end.
`X-AMZN-something` at least though probably predates that; a mix of `X-AMZN` and `AMZN` would be annoying. (Although I suppose they could say 'We've deprecated `X-`, it'll be stripped and still work, but please don't use it in new code' applying to all of them, old and new.)