rackerlabs/otter — pull request #842 by manishtomar (2014-12-17 01:52:49+00:00)
Title: Cloud metrics support in request_func

Implements #810
- Added support for cloud metrics ingest service in `get_request_func`
- Using request function to add to cloud metrics. This has couple of advantages:
- the code is effectful making it easier to purer and easier to test.
- it does not contain distracting auth stuff
- the tenant is authenticated only once and token is reused until it expires.
- Setting service name defaults in `get_service_mapping` instead of each `Service` setting it. So, removed "cloudServersOpenStack" from metrics.py but cannot remove it from tap/api.py as unfortunately these configs are used by worker

This needs to be deployed after adding tenant_id in metrics config file. Will open a PR for that soon.