-
Notifications
You must be signed in to change notification settings - Fork 179
Fix missing instrumentation of the Statement::execute()
method of Doctrine DBAL
#548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing instrumentation of the Statement::execute()
method of Doctrine DBAL
#548
Conversation
de8cac6
to
0b3318c
Compare
0b3318c
to
d9fb860
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a bit complicated, but we don't have any other way around it...
@ste93cry could you please fix the phpstan errors? seems to me these errors hold the pull request to be merged and a new version released |
@jokaorgua we're still having issues in solving this. PHPStan doesn't seem to be able to overcome the fact that we're conditionally declaring a class, so it stumbles on the incompatible interface. We haven't still found a way around it. |
That's right, but the solution to solve those errors is to ignore analysis for entire files because PHPStan crash badly otherwise, which imho it shouldn't. I'm investigating if there is any solution or if reporting the issue upstream would be acceptable |
Finally, it's green!! |
@jokaorgua before we get this released, likely next week, can you please try it out and see if everything works as expected? |
will do. once checked will make a comment here |
@ste93cry everything is ok. I see sql.stmt.execute row |
Fixes #544: thanks to @jokaorgua I found out that the
Doctrine\DBAL\Driver\Statement::execute()
method has to be instrumented as well for the tracing of SQL queries to work properly in case a prepared statement is used, e.g. when calling theDoctrine\DBAL\Connection::fetch*()
methods and passing some query params to them. I voluntarily avoided a child span for theTracingStatement::execute()
method because you may prepare a query and run it later, so it doesn't make sense to have it nested into the one of theTracingDriverConnection::prepare()
method as it would have happened by creating it inside the callback of theTracingDriverConnection::traceFunction()
function