This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
weblog: Correctly parse multiple values in nginx upstream_response_ti…
…me (#711) This commit changes the way how the upstream_response_time field is parsed in nginx access logs. The field can contain multiple time values if the request got processed by multiple upstream servers, or if it passed through an internal redirect between multiple server groups (i.e. by using the X-Accel-Redirect header). Previously, only the first encountered value was processed by weblog plugin, and it only accounted for the ',' separator. If the field contained the ':' separator, the value was not parsed correctly. With this commit applied, both of these cases will be handled correctly. Additionaly, the value reported will be the sum of times from all upstream servers that handled the request, i.e. the total time the request spent upstream. Co-authored-by: Jan Kral <jan.kral@4net.tv>
- Loading branch information