Prevent the Agent from storing raw SQL queries in memory when "record_sql" is "off" or "obfuscated" #461
Description
It looks like the Agent will currently store any full, raw SQL query that it detects until the end of the Tracer. At that point it checks the Agent's "record_sql" configuration and either obfuscates the query or drops it entirely. Unfortunately we've seen a few instances where customers have a huge number of large SQL queries being executed which causes the Agent to take up massive amounts of heap space over short periods.
Since the "record_sql" configuration doesn't prevent the raw queries from being stored in memory we don't have any good options of resolving the issue except by disabling the database instrumentation entirely.
Allowing the "record_sql" configuration to immediately affect the data that gets stored in memory, either by obfuscating that data first or dropping it entirely(based on the exact configuration), would give Support a path forward to prevent raw SQL query data from using memory space, if needed.
(Migrate to Jira)