Disables jdbc parameter logging by default. You need to opt in. Fixes gh-2073

This commit is contained in:
Marcin Grzejszczak
2021-12-07 14:10:25 +01:00
parent faa2c0fa53
commit d2126be347
5 changed files with 32 additions and 6 deletions

View File

@@ -46,7 +46,7 @@
|spring.sleuth.jdbc.p6spy.log-format | | Custom log format.
|spring.sleuth.jdbc.p6spy.logging | | Logging to use for logging queries.
|spring.sleuth.jdbc.p6spy.multiline | `true` | Enables multiline output.
|spring.sleuth.jdbc.p6spy.tracing.include-parameter-values | `true` | Report the effective sql string (with '?' replaced with real values) to tracing systems. <p> NOTE this setting does not affect the logging message.
|spring.sleuth.jdbc.p6spy.tracing.include-parameter-values | `false` | Report the effective sql string (with '?' replaced with real values) to tracing systems. <p> NOTE this setting does not affect the logging message.
|spring.sleuth.kafka.enabled | `true` | Enable instrumenting of Apache Kafka clients.
|spring.sleuth.messaging.aspect.enabled | `false` | Should {@link MessageMapping} wrapping be enabled.
|spring.sleuth.messaging.enabled | `false` | Should messaging be turned on.

View File

@@ -768,9 +768,11 @@ runtimeOnly "net.ttddyy:datasource-proxy:${datasourceProxyVersion}"
Please check the <<appendix.adoc#appendix,appendix>> page under `spring.sleuth.jdbc.p6spy` for all p6spy configuration options and `spring.sleuth.jdbc.datasource-proxy` for all datasource proxy configuration options.
For P6Spy by default logging parameter values will be disabled, set `spring.sleuth.jdbc.p6spy.tracing.include-parameter-values` to `true` to enable it.
You can configure P6Spy manually using one of available configuration methods. For more information please refer to the http://p6spy.readthedocs.io/en/latest/configandusage.html[P6Spy Configuration Guide].
By default logging queries will be disabled, set `spring.sleuth.jdbc.datasource-proxy.slow-query.enable-logging` to `true` to enable logging slow queries
For Datasource Proxy by default logging queries will be disabled, set `spring.sleuth.jdbc.datasource-proxy.slow-query.enable-logging` to `true` to enable logging slow queries
and set `spring.sleuth.jdbc.datasource-proxy.query.enable-logging` to `true` to enable logging all queries.
In order to disable this instrumentation set `spring.sleuth.jdbc.enabled` to `false`.