Add ability to exclude metrics

Handle exclusion rules so that the matching metrics are not reported to
CloudWatch.
This is useful to contain the metrics to only the wanted ones,
minimizing network traffic and, crucially, AWS bills.

This change is an adaptation of the approach used by [1] and by [2].

[1] https://gerrit-review.googlesource.com/c/plugins/metrics-reporter-prometheus/+/253638
[2] https://gerrit-review.googlesource.com/c/plugins/metrics-reporter-jmx/+/253634

Feature: Issue 13148
Change-Id: I82635cd152582e7f10eff8ebbe0eeaf29d868e7e
5 files changed
tree: c0fa4ad423bd7daa895dc38df8b7e1f244573de9
  1. src/
  2. BUILD
  3. external_plugin_deps.bzl