Support tracing of Mysql2 gem prepared statements #3771
Labels
community
Was opened by a community member
feature-request
A request for a new feature or change to an existing one
Current behaviour
We have a Ruby application that uses the mysql2 gem to communicate directly with a MySQL cluster. No Active Record; these are native MySQL clients. Our clients issue some calls with
.execute
and other calls with.prepare
through prepared statements. We have configured the MySQL integration config as called out in the documentation.The existing
dd-trace-rb
gem we are using (version:1.23.0
), appears to only trace the.execute
calls and none of the prepared statement I/O via the mysql2 gem. We can see in our APM traces only the.execute
calls to the MySQL and none of our prepared statement I/O. For us this produces APM flame graphs of 3 rapid-fire queries and then blank space where we know our application code is issuing prepared statements and streaming results back to our app.Example redacted flame graph:
Expected behaviour
We would expect the tracing to show the SQL of prepared statements and the calls to retrieve the record sets from the prepared statements.
It looks like the dd-trace-js code added this support in 2019.
Steps to reproduce
How does
datadog
help you?I generally love DataDog. This was a surprising blind spot.
Environment
datadog version:
Whatever is current in SaaS as of June 20, 2024.
Configuration block (
Datadog.configure ...
):Ruby version:
3.3.1
Operating system:
Consistent behavior on all of: Red Hat UBI, Amazon Linux, and Ubuntu 2022 LTS
Relevant library versions:
The text was updated successfully, but these errors were encountered: