619b7e1ee0
* Add osprofiler wsgi middleware. This middleware is used for 2 things: 1) It checks that person who wants to trace is trusted and knows secret HMAC key. 2) It starts tracing in case of proper trace headers and adds first wsgi trace point, with info about HTTP request * Traces HTTP API calls * Traces DB (SQLAlchemy) calls Demo: https://tovin07.github.io/panko/openstack-event-list.html HOW TO TEST? 1. Install devstack with panko as usual 2. Install osprofiler pip install osprofiler 3. Add these line to /etc/panko/panko.conf [profiler] enabled = true hmac_keys = SECRET_KEY connection_string = redis://localhost:6379 # example when using redis 4. Pass HMAC_KEYS to client commands - panko client with `--profile <HMAC_KEYS>` - openstack client with `--os-profiler <HMAC_KEYS>` Output will look like this: To display trace use the command: osprofiler trace show --html <TRACE_ID> 5. Use osprofiler to get the trace osprofiler trace show \ --connection-string redis://localhost:6379 \ --out out.html \ --html <TRACE_ID> 6. Open that html file with browser and view the result Change-Id: Ic934acbe1340a3e00361f2709f34725e0e4aa3ba |
||
---|---|---|
.. | ||
api_paste.ini | ||
panko-config-generator.conf | ||
panko-policy-generator.conf |