Describe the bug
DB statement sanitization is enabled by default: https://opentelemetry.io/docs/zero-code/java/agent/instrumentation/#db-statement-sanitization
I was debugging memory leak for an application that dynamically builds large SQL query strings and frequently executes them using JDBC. I saw a lot of humongous live objects accumulating in heap space. After analyzing a heap dump I saw that the root cause is in a sqlToStatementInfoCache field in a io.opentelemetry.javaagent.shaded.instrumentation.api.incubator.semconv.db.SqlStatementSanitizer class.
Please let me know what additional information I can provide to help diagnose this issue.
Steps to reproduce
An application that dynamically builds large SQL query strings and frequently executes them using JDBC.
Expected behavior
Memory usage returns to baseline when application is idling.
Actual behavior
Baseline memory usage increases after application runs jobs involving a lot of large SQL query executions.
Javaagent or library instrumentation version
2.11.0
Environment
JDK: Amazon Coretto 17
OS: Alpine 3.18
Additional context
While investigating I ran application with different garbage collectors. Disabling DB statement sanitization resolved the issue.
Describe the bug
DB statement sanitization is enabled by default: https://opentelemetry.io/docs/zero-code/java/agent/instrumentation/#db-statement-sanitization
I was debugging memory leak for an application that dynamically builds large SQL query strings and frequently executes them using JDBC. I saw a lot of humongous live objects accumulating in heap space. After analyzing a heap dump I saw that the root cause is in a
sqlToStatementInfoCachefield in aio.opentelemetry.javaagent.shaded.instrumentation.api.incubator.semconv.db.SqlStatementSanitizerclass.Please let me know what additional information I can provide to help diagnose this issue.
Steps to reproduce
An application that dynamically builds large SQL query strings and frequently executes them using JDBC.
Expected behavior
Memory usage returns to baseline when application is idling.
Actual behavior
Baseline memory usage increases after application runs jobs involving a lot of large SQL query executions.
Javaagent or library instrumentation version
2.11.0
Environment
JDK: Amazon Coretto 17
OS: Alpine 3.18
Additional context
While investigating I ran application with different garbage collectors. Disabling DB statement sanitization resolved the issue.