shatteredsilicon / ssm-submodules

GNU Affero General Public License v3.0
0 stars 2 forks source link

Improve QAN harvesting of prepared statements from performance_schema #243

Open gordan-bobic opened 2 months ago

gordan-bobic commented 2 months ago

We had to disable prepared statement harvesting from performance_schema because the default harvesting process wasn't handling the case where multiple prepared statements of the same template (SQL_TEXT) are in play.

This ticket is to track improving the query harvester with a separate query harvesting code path for prepared statements so that we can have both the prepared and regular statements harvested from performance_schema.

We'll still be missing the prepared statements from systems designed with the anti-pattern where connections or prepared statements are short lived, but capturing some prepared statements is still far better than capturing no prepared statements.

oblitorum commented 2 months ago

As a record, this PR is to separate current query harvesting from prepared_statements and query harvesting from events_statements_summary_by_digest, so that if anything goes wrong when harvesting from prepared_statements, it won't break the harvesting from events_statements_summary_by_digest.