-
Notifications
You must be signed in to change notification settings - Fork 821
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
feat(plugin): pg-pool plugin implementation #501
feat(plugin): pg-pool plugin implementation #501
Conversation
Codecov Report
@@ Coverage Diff @@
## master #501 +/- ##
==========================================
- Coverage 90.52% 88.74% -1.78%
==========================================
Files 198 195 -3
Lines 9718 9790 +72
Branches 882 902 +20
==========================================
- Hits 8797 8688 -109
- Misses 921 1102 +181
|
…metry-js into xiao/pg-pool-implement
|
||
export enum AttributeNames { | ||
COMPONENT = 'component', | ||
} |
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.
Are any of the attributes from pg applicable here?
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.
yes, will fix this.
} | ||
|
||
// Else a callback was provided, so just return the result | ||
span.end(); |
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.
For this case, I think this span will be ended immediately -- before the network calls finish. For callbacks scenarios, I think we should patch the callback and end the span (and set the corresponding status) once the callback is called. Similar to pg plugin utils.patchCallback
@open-telemetry/javascript-approvers Please review this one when you get a chance. |
@open-telemetry/javascript-approvers: If someone has knowledge of |
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.
Approving, but added a couple question comments.
} | ||
|
||
protected patch(): typeof pgPoolTypes { | ||
if (this._moduleExports.prototype.connect) { |
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.
Is this if statement necessary? Is there any case where connect
would be missing?
static readonly COMPONENT = 'pg-pool'; | ||
static readonly DB_TYPE = 'sql'; | ||
|
||
readonly supportedVersions = ['^2.0.7']; |
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.
Do we not support 2.0
versions below 2.0.7
?
@xiao-lix Could you please address last round of comments, I think this is good to go. |
…metry-js into xiao/pg-pool-implement
Which problem is this PR solving?
Short description of the changes