From 639e36adbfa0f58ce2c3f31856b4343e9197aa0e Mon Sep 17 00:00:00 2001 From: Dina Belova Date: Fri, 11 Mar 2016 16:29:23 +0300 Subject: Integrate OSprofiler in Keystone OSprofiler is an Oslo library dedicated to enable cross-service OpenStack profiling. This makes possible to trace the OpenStack request through all projects supporting the library, where the profiling is enabled, and generate JSON and HTML human-readable reports, describing what time was spent on which operation, e.g. API or DB request. This change inclues the following: * Add settings for 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 (that is specified in paste.ini). 2) It initalize profiler in case of proper trace headers and add first wsgi trace point, with info about HTTP request. * Init profiler on start in both cases (httpd or eventlet) * Adding new conf group for profiler (to enable/disable) * By default osprofiler is disabled TBD: * Adding trace point for all DB (sql) calls. For proper format and result oslo.db enginefacade module needs to be updated. To test (old variant, will be changed with new commit to the python-openstackclient): $ . amdminrc # you should be admin user/tenant to fetch profiling data $ keystone --profile SECRET_KEY user-list $ osprofiler trace show --html --out result.html Old python-keystoneclient change: https://review.openstack.org/#/c/114856/ Python-openstack client change: https://review.openstack.org/#/c/255861/ Depends-On: I248b134e0e245bd4cece0ebe225b9b729eedaf78 Change-Id: I3d6eaa7a5ab7ee9ae177f3e1d6cc92f0a01e6a42 --- config-generator/keystone.conf | 1 + 1 file changed, 1 insertion(+) (limited to 'config-generator/keystone.conf') diff --git a/config-generator/keystone.conf b/config-generator/keystone.conf index fc5ef29cd..8713c0258 100644 --- a/config-generator/keystone.conf +++ b/config-generator/keystone.conf @@ -10,6 +10,7 @@ namespace = oslo.policy namespace = oslo.db namespace = oslo.middleware namespace = oslo.service.service +namespace = osprofiler # We don't use oslo.concurrency config options in # keystone now, just in case it slips through unnoticed. #namespace = oslo.concurrency -- cgit v1.2.1