-
Notifications
You must be signed in to change notification settings - Fork 621
fix(pg-instrumentation): capture query props when passed as class instance #3249
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
Conversation
|
|
1ad024e to
b8524b1
Compare
|
Hey @GochoMugo, I reviewed #3259 without seeing that you opened this before. However I do prefer the approach you're taking here by still creating a new object as opposed to updating the existing one. Would you be able to rebase your changes on the current version ? There are already new tests covering the non-enumerable property cases so only the instrumentation changes would be needed. |
b8524b1 to
802c260
Compare
@raphael-theriault-swi Sure, I have rebased the PR. |
raphael-theriault-swi
left a comment
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.
Much appreciated !
|
@GochoMugo for future reference, don't force push your changes, because then we miss the history and we can't see what exactly changed since latest review :) |
|
Thank you for your contribution @GochoMugo! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. |
Which problem is this PR solving?
When using sql-templating libraries such as sql-template-strings, the query object is usually not a plain object, and instead a class instance.
An extracted snippet:
This class would be instantiated, for example, when using template string:
With the changes added in PR #3196, the
textproperty from theStatementclass above would not be captured when using the spread operator i.e.{ ...arg0 }.For example,
Short description of the changes
The current fix is to explicitly capture
nameandtextprops while still using the spread operator.