Codebase list python-osprofiler / cffca4e
Merge "Expose connection_string parameter into DevStack plugin" Jenkins authored 6 years ago Gerrit Code Review committed 6 years ago
3 changed file(s) with 36 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
44 This directory contains the files necessary to run OpenStack with enabled
55 OSProfiler in DevStack.
66
7 To configure DevStack to enable OSProfiler edit
8 ``${DEVSTACK_DIR}/local.conf`` file and add::
7 OSProfiler has different drivers for trace processing. The default driver uses
8 Ceilometer to process and store trace events. Other drivers may connect
9 to databases directly and do not require Ceilometer.
10
11 To configure DevStack and enable OSProfiler edit ``${DEVSTACK_DIR}/local.conf``
12 file and add the following to ``[[local|localrc]]`` section:
13
14 * to use specified driver::
15
16 enable_plugin osprofiler https://git.openstack.org/openstack/osprofiler master
17 OSPROFILER_CONNECTION_STRING=<connection string value>
18
19 the driver is chosen depending on the value of
20 ``OSPROFILER_CONNECTION_STRING`` variable (refer to the next section for
21 details)
22
23 * to use default Ceilometer driver::
924
1025 enable_plugin panko https://git.openstack.org/openstack/panko master
1126 enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer master
1227 enable_plugin osprofiler https://git.openstack.org/openstack/osprofiler master
1328
14 to the ``[[local|localrc]]`` section.
29 .. note:: The order of enabling plugins matters.
1530
16 One can also configure a set of HMAC secrets, that are used for triggering of
17 profiling in OpenStack services: only the requests that specify one of these
31 Run DevStack as normal::
32
33 $ ./stack.sh
34
35
36 Config variables
37 ----------------
38
39 **OSPROFILER_HMAC_KEYS** - a set of HMAC secrets, that are used for triggering
40 of profiling in OpenStack services: only the requests that specify one of these
1841 keys in HTTP headers will be profiled. E.g. multiple secrets are specified as
1942 a comma-separated list of string values::
2043
2144 OSPROFILER_HMAC_KEYS=swordfish,foxtrot,charlie
2245
23 .. note:: The order of enabling plugins matter.
46 **OSPROFILER_CONNECTION_STRING** - connection string to identify the driver.
47 Default value is ``messaging://`` refers to Ceilometer driver. For a full
48 list of drivers please refer to
49 ``http://git.openstack.org/cgit/openstack/osprofiler/tree/osprofiler/drivers``.
50 Example: enable ElasticSearch driver with the server running on localhost::
2451
25 Run DevStack as normal::
52 OSPROFILER_CONNECTION_STRING=elasticsearch://127.0.0.1:9200
2653
27 $ ./stack.sh
5252 iniset $conf profiler enabled True
5353 iniset $conf profiler trace_sqlalchemy True
5454 iniset $conf profiler hmac_keys $OSPROFILER_HMAC_KEYS
55 iniset $conf profiler connection_string $OSPROFILER_CONNECTION_STRING
5556 fi
5657 done
5758 if [ -f $CEILOMETER_CONF ]
33 # of profiling in OpenStack services: profiling is only performed for
44 # requests that specify one of these keys in HTTP headers.
55 OSPROFILER_HMAC_KEYS=${OSPROFILER_HMAC_KEYS:-"SECRET_KEY"}
6 OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-"messaging://"}
67
78 enable_service osprofiler