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