Skip to content

Instantly share code, notes, and snippets.

@leandromoreira
Last active April 12, 2020 02:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save leandromoreira/a10c98e525fa9cf9379aaaafdbb214e8 to your computer and use it in GitHub Desktop.
-- header_filter_by_lua_block
ngx.header['X-Metrics-upstream_response_time'] = ngx.var.upstream_response_time
ngx.header['X-Metrics-upstream_connect_time'] = ngx.var.upstream_connect_time
ngx.header['X-Metrics-request_time'] = ngx.var.request_time
ngx.header['X-Metrics-tcpinfo_rtt'] = ngx.var.tcpinfo_rtt
ngx.header['X-Metrics-time_iso8601'] = ngx.var.time_iso8601
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment