diff options
| author | Ilya Shakhat <shakhat@gmail.com> | 2018-09-17 15:52:40 +0200 |
|---|---|---|
| committer | Ilya Shakhat <shakhat@gmail.com> | 2018-09-17 15:52:40 +0200 |
| commit | 2f66049fb8d7b785b0487bf39df9004d388bcf1b (patch) | |
| tree | 2b7fc3e211d256bb6cd99c9c0b2987a12b0de832 /devstack | |
| parent | 2b4786b5cc819c5d321d97e3cf9e1d5f24ebdb97 (diff) | |
| download | osprofiler-2f66049fb8d7b785b0487bf39df9004d388bcf1b.tar.gz | |
Make tracing of SQL statements configurable in DevStack plugin
This patch adds a new configuration variable OSPROFILER_TRACE_SQLALCHEMY
with default value `True`.
Change-Id: I72c782872dac370d6d1620cf734a293f998ed7f1
Diffstat (limited to 'devstack')
| -rw-r--r-- | devstack/README.rst | 6 | ||||
| -rw-r--r-- | devstack/lib/osprofiler | 2 | ||||
| -rw-r--r-- | devstack/settings | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/devstack/README.rst b/devstack/README.rst index 97361ae..2d4ceab 100644 --- a/devstack/README.rst +++ b/devstack/README.rst @@ -80,3 +80,9 @@ that the default messaging driver is used. Example: enable Redis collector:: OSPROFILER_COLLECTOR=redis + +**OSPROFILER_TRACE_SQLALCHEMY** - controls tracing of SQL statements. If enabled, +all SQL statements processed by SQL Alchemy are added into traces. By default enabled. +Example: disable SQL statements tracing:: + + OSPROFILER_TRACE_SQLALCHEMY=False diff --git a/devstack/lib/osprofiler b/devstack/lib/osprofiler index 4bff5ed..607a2f4 100644 --- a/devstack/lib/osprofiler +++ b/devstack/lib/osprofiler @@ -71,7 +71,7 @@ function configure_osprofiler() { if [ -f $conf ] then iniset $conf profiler enabled True - iniset $conf profiler trace_sqlalchemy True + iniset $conf profiler trace_sqlalchemy $OSPROFILER_TRACE_SQLALCHEMY iniset $conf profiler hmac_keys $OSPROFILER_HMAC_KEYS iniset $conf profiler connection_string $OSPROFILER_CONNECTION_STRING fi diff --git a/devstack/settings b/devstack/settings index ac689c9..f401e12 100644 --- a/devstack/settings +++ b/devstack/settings @@ -5,4 +5,7 @@ # requests that specify one of these keys in HTTP headers. OSPROFILER_HMAC_KEYS=${OSPROFILER_HMAC_KEYS:-"SECRET_KEY"} +# Set whether tracing of SQL requests is enabled or not +OSPROFILER_TRACE_SQLALCHEMY="True" + enable_service osprofiler |
