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.

BUG=chromium:1061364
TEST=Manually tested on chromeos2-devservertest. Details:
http://gpaste/5139800782798848.

Change-Id: I88d88f18b478d5b8ad6fbc128f029c49479e4f21
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/2347872
Tested-by: Sanika Kulkarni <sanikak@chromium.org>
Reviewed-by: Congbin Guo <guocb@chromium.org>
Commit-Queue: Sanika Kulkarni <sanikak@chromium.org>
Auto-Submit: Sanika Kulkarni <sanikak@chromium.org>
1 file changed