Skip to content
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

Support for psycopg Composed queries #749

Open
pcrock-thmdo opened this issue Jan 25, 2023 · 3 comments
Open

Support for psycopg Composed queries #749

pcrock-thmdo opened this issue Jan 25, 2023 · 3 comments

Comments

@pcrock-thmdo
Copy link

The Scout agent breaks when it tries to instrument raw queries in Django that use psycopg2's SQL string composition. Specifically, we get a TypeError: unhashable type: 'Composed' on this line of code:

I created a workaround that converts the query to a raw string before executing it, however it involves getting a cursor and compiling the string before doing the actual query. That's more overhead than I would prefer, so it would be really nice if Scout were able to support Composed as well.

@pcrock-thmdo pcrock-thmdo changed the title Support for psycopg Composable queries Support for psycopg Composed queries Jan 25, 2023
@tim-schilling
Copy link
Collaborator

Hi @pcrock-thmdo, thanks for opening the issue. Can you provide me with a reproducible example? That'll make the investigation a bit easier.

@pcrock-thmdo
Copy link
Author

Thanks for responding @tim-schilling, and sorry for the delay. Because of sickness, etc., I haven't had time to do this yet, but I'll get you an example soon.

@pcrock-thmdo
Copy link
Author

This reproduces the issue: https://github.com/pcrock-thmdo/scout-issue-749-poc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants