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

SQL: Capture full SQL statement instead of PREPARED STATEMENT #1697

Open
gouthamve opened this issue Feb 24, 2025 · 2 comments
Open

SQL: Capture full SQL statement instead of PREPARED STATEMENT #1697

gouthamve opened this issue Feb 24, 2025 · 2 comments

Comments

@gouthamve
Copy link
Member

Teeing off of #1695

A lot of the spans say PREPARED STATEMENT . while we should be capturing the underlying SQL calls.

Image
@grcevski
Copy link
Contributor

Yeah, this is sort of a limitation of how things work at the moment, with us detecting the SQL statement based on the protocol information. When prepared statement is run, the client supplies the statement ID + the arguments, so the SQL is not actually visible.

I think we need to look into if we can do the same thing we did for gRPC. Namely, if we see the prepare command, then we can create internal mapping SQL statement <> ID and then we can substitute it when someone calls the prepared statement.

Is this Postgres or MySQL?

@gouthamve
Copy link
Member Author

This is Postgres. And this is purely on the server side btw. The client sits on a node that doesn't have BTF.

@marctc marctc removed the feature label Feb 24, 2025
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

3 participants