#support

Disabling "?" in SQL Criteria for App

TLDR Sanjiv asked how to disable "?" in SQL criteria. vishal-signoz suggested checking the instrumentation library. Ankit provided a solution using OTEL_INSTRUMENTATION_COMMON_DB_STATEMENT_SANITIZER_ENABLED.

Powered by Struct AI
Mar 02, 2023 (9 months ago)
Sanjiv
Photo of md5-914a8b39b82fd99b8ecd985427660deb
Sanjiv
08:01 PM
The demo app has the full SQL however in my app the values in the sql criteria are replaced by “?”. Is there a way to disable the ? and have the actual value?
Image 1 for The demo app has the full SQL however in my app the values in the sql criteria are replaced by “?”. Is there a way to disable the ? and have the actual value?
Mar 03, 2023 (9 months ago)
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
12:24 AM
Depends on how you have instrumented, if you have auto instrumented then check on the instrumentation library.
If you are manually instrumenting then set sql.query attribute in the span.
Ankit
Photo of md5-dbe7088320fe1d922707613e02f3420d
Ankit
04:54 AM
Sanjiv you can disable OTEL_INSTRUMENTATION_COMMON_DB_STATEMENT_SANITIZER_ENABLED as in docs https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/#db-statement-sanitization