apache_log_metrics: Fix endpoint explosion

By not matching a pattern against the file name uploaded by /static/
endpoints, we risk emitting too many streams to Monarch. Fix this by
providing a canonical name for a fixed set of filename patterns and
emitting filename='' otherwise.

Also, require milestone to match 'R\d+' to avoid having non-milestone
strings being matched.

BUG=chromium:630799, chromium:630797
TEST=unittests pass.

Change-Id: Ia47c29cf1bb92a0f3d9282b0eb9ff9f8fa28f04e
Reviewed-on: https://chromium-review.googlesource.com/362698
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Paul Hobbs <phobbs@google.com>
1 file changed