[autotest] Add capability to log metadata stats module to esdb
Adds functionality to stats objects to take in optional metadata that
is reported to elasticsearch. This change also includes a functional
test script that verifies stats objects correctly report metadata
to elasticsearch. This involves adding an external package for
wrapping a connection to es. Also added mock for elasticsearch
which resulted in refactor of statsd_mock.
TEST=python stats_es_functionaltest.py --all --es_port=prod
for both http and udp (by changing shadow config)
TEST=python elasticsearch_mock_unittest.py
TEST=python statsd_mock_unittest.py
BUG=None
Change-Id: I5971e39623e465a42a46dafc61fb26a1fb129391
Reviewed-on: https://chromium-review.googlesource.com/205776
Tested-by: Michael Liang <michaelliang@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Michael Liang <michaelliang@chromium.org>
10 files changed