-
Notifications
You must be signed in to change notification settings - Fork 172
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: get correct table name if table name is quoted #1234
base: main
Are you sure you want to change the base?
Conversation
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.
Thank you for your contribution.
@kaylareopelle @hannahramadan would you all mind comparing that to the new relic implementation to see if we are missing anything else?
Thanks @HielkeJ! I'm wondering if we should remove the single quotes from the regex. @mostfunkyduck pointed out that single quotes are for string literals, not identifiers. What do you think @arielvalentin @scbjans New Relic does not have this implemented and I didn't see others who did, so unfortunately not a lot to compare to. |
Thanks for pointing that out, I somehow read past that. |
I did a small update in the PR @hannahramadan. If I try in Postgres to to a select SELECT * FROM 'table', it returns a syntax error. I didn't test if it fails in opentelemetry-ruby-contrib as well with a syntax error, but at least in shouldn't run the query. |
Given this new information I'm going to rescind my approval and scrutinize this a little more. I'll leave the final approval to some other folks. |
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 looks good to me with the recent updates.
TABLE_NAME is extracted if the table name is quoted. Should fix #1173