nginx_access_log_metrics: add response code to nginx metrics

Update nginx_access_log_metrics so that it also emits status
code of each request. Also update the regex pattern so that
all requests are parsed and not only GET.

The metrics.Counter class can only be icremented with a maximum
of seven fields. Therefore, remove 'version' from the fields for
the emitted metric.

TEST=Manually tested on chromeos2-devservertest. Details:

Change-Id: I88d88f18b478d5b8ad6fbc128f029c49479e4f21
Tested-by: Sanika Kulkarni <>
Reviewed-by: Congbin Guo <>
Commit-Queue: Sanika Kulkarni <>
Auto-Submit: Sanika Kulkarni <>
1 file changed