zaqar/zaqar/tests/unit/common
Zhi Yan Liu 47324171d4 Integrate OSprofiler with Zaqar
*) Add osprofiler wsgi middleware
This middleware is used for 2 things:
1) It checks that person who want to trace is trusted and knows
secret HMAC key.
2) It start tracing in case of proper trace headers
and add first wsgi trace point, with info about HTTP request.

*) Add initialization of osprofiler at start of server
Initialize and set an oslo.messaging based notifier instance
to osprofiler which be used to send notifications to Ceilometer.

*) Enable profile on existing useful storage backends
Change controller creation logic of data and control panel for
mongodb, redis and sqlalchemy storage backends, as well as
an aggregative pooling driver.

*) Add options to allow operator control profiles separately

NOTE to test this:
1) You have to enable necessary profiler option(s) base on your needed.
2) You need to enable follow services in localrc for devstack:
  CEILOMETER_NOTIFICATION_TOPICS=notifications,profiler
  ENABLED_SERVICES+=,ceilometer-acompute,ceilometer-acentral
  ENABLED_SERVICES+=,ceilometer-anotification,ceilometer-collector
  ENABLED_SERVICES+=,ceilometer-alarm-evaluator,ceilometer-alarm-notifier
  ENABLED_SERVICES+=,ceilometer-api
3) You should use python-zaqarclient with this change:
  I880c003511e9e4ef99806ba5b19d0ef6996be80b

Run any command with --os-profile <SECRET_KEY>
  $ openstack --os-profile <SECRET_KEY> queue list
  # it will print <Trace ID>
Get pretty HTML with traces:
  $ osprofiler trace show --html <Trace ID>
note that osprofiler should be run from admin user name & tenant.

DocImpact

Partially-implements BP: osprofiler
Change-Id: I32565de6c447cd5e95a0ef54a9fbd4e571c2d820
Co-Authored-By: wangxiyuan <wangxiyuan@huawei.com>
2016-11-18 08:33:31 +00:00
..
storage Integrate OSprofiler with Zaqar 2016-11-18 08:33:31 +00:00
__init__.py Move all remaining unit tests out of tests/ 2015-06-12 09:26:44 +02:00
test_api.py Move all remaining unit tests out of tests/ 2015-06-12 09:26:44 +02:00
test_decorators.py Disable DEPRECATED API versions by default 2016-09-04 11:55:24 +12:00
test_pipeline.py Fix order of arguments in assertEqual 2015-09-29 08:39:19 +00:00
test_request.py Consolidate constants to a module 2016-09-07 03:52:56 -04:00
test_urls.py expires should be checked when using pre-signed url 2016-03-31 11:29:59 +08:00