Closed kuchichan closed 6 months ago
Hi @kuchichan thanks for reaching out, we'll look into this.
This issue has been automatically closed after a period of inactivity. If it's a feature request, it has been added to the maintainers' internal backlog and will be included in an upcoming round of feature prioritization. Please comment or reopen if you think this issue was closed in error.
Summary of problem
Aiomysql does not appear as an external service in the datadog dashboard (flamegraph and other views) like any other integration, when called within wrapped (
@trace.wrap
) function, but (for instance) redis does.Which version of dd-trace-py are you using?
ddtrace 2.4.0
Which version of pip are you using?
pip 23.3.1
Which libraries and their versions are you using?
`pip freeze`
How can we reproduce your problem?
Please consider the following (somewhat minimum) example:
Corresponding
docker-compose.yml
If you want to propagate initial data to the db, just switch,
fetch_t1
insideasyncio.run
topropagate_data
.To reproduce, simply run this python script, and observe the flamegraph for
dummy-service
trace in the datadog APM dashboard.What is the result that you get?
As you can see, sql query internals are mangled into dummy-service, but redis
SET
command is displayed as a separate service (which is cool thing, because it's an external library / client which I do not control directly).What is the result that you expected?
I expected, that
aiomysql
integration behaviour will be identical as the redis integration. In many cases aiomysqlConnection
object is not used directly, but rather via some upper abstraction layer mechanisms like sessions, transactions and similar. These upper abstraction layers are later used in the (let's say) application / use-cases code, which indeed leverage@tracer.wrap
a lot, so it's really hard to avoid the situation, when aiomysql span is not a child span.