horizon/openstack_dashboard/local/local_settings.d
Timur Sufiev dd98e10dbf Provide the bones of profiler: api and middleware
Middleware is the backbone of the whole profiler facility. It adds an
encoded payload to each request that should be profiled with
osprofiler library. This library is embedded into other OpenStack
services where it tries to decode the message with a known set of keys
(so Horizon middleware should use one of these keys) and if
successful, sends a message to MongoDB (via osprofiler driver). Every
message has its own id, the base id (root message id) and parent
id. Using these 3 ids a tree of trace messages is assembled.

Actually, Horizon Django application uses 2 middleware classes:
ProfilerClientMIddleware and
ProfilerMiddleware. ProfilerClientMiddleware is used to enable Horizon
self-profiling (profiling from the UI): if a specific key is found in
cookies, then 2 standard osprofiler headers are added to a
request. These headers are processed by ProfilerMiddleware which
should always be the last middleware class in a Django config, since
it's defines `process_view` method which returns HttpResponse object
effectively terminating the middleware process_view chain. Assuming
that all API calls happen during rendering a view, Horizon sets a
tracepoint there which becomes a root node of the trace calls tree.

Implements-blueprint: openstack-profiler-at-developer-dashboard
Change-Id: Ib896676e304f2984c011bd1b610c86d1f24d46b9
2016-11-09 11:51:06 +03:00
..
_10_set_custom_theme.py.example Update comment in _10_set_custom_theme.py.example 2016-09-05 21:34:24 +03:00
_11_toggle_angular_features.py.example Add ANGULAR_FEATURES toggle example 2016-08-18 09:24:30 +00:00
_20_integration_tests_scaffolds.py.example Move out integration tests scaffolds from Horizon production code 2016-05-31 10:01:21 +00:00
_2010_integration_tests_deprecated.py.example Flavors panel can switch to Angular 2016-10-11 15:49:55 -07:00
_9030_profiler_settings.py.example Provide the bones of profiler: api and middleware 2016-11-09 11:51:06 +03:00