-
Notifications
You must be signed in to change notification settings - Fork 580
feat: typeorm instrumentation #2187
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: typeorm instrumentation #2187
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2187 +/- ##
==========================================
+ Coverage 89.53% 89.55% +0.01%
==========================================
Files 174 180 +6
Lines 8521 8719 +198
Branches 1727 1767 +40
==========================================
+ Hits 7629 7808 +179
- Misses 892 911 +19
🚀 New features to boost your workflow:
|
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 working on this 🙏🎉
Left few comments and suggestions
The original instrumentation had a test-all-versions setup. I wonder if it was left out on purpose or just overlooked.
import { InstrumentationConfig } from '@opentelemetry/instrumentation'; | ||
|
||
export enum ExtendedDatabaseAttribute { | ||
DB_STATEMENT_PARAMETERS = 'db.statement.parameters', |
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.
While this isn't a speced name similar to many others, there is still this rule for semantic attributes which the existing name violates:
Names SHOULD NOT coincide with namespaces. For example if service.instance.id is an attribute name then it is no longer valid to have an attribute named service.instance because service.instance is already a namespace
Since we already have db.statement
, I think it is better to use the opportunity and rename it to db.typeorm.parameters
(similar to 'db.postgresql.values'
, 'db.mysql.values'
). or some other good name that does not make db.statement
a namespace.
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.
Changed it, thanks
specify max version support
Overlooked, going to re-add it, thanks! |
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.
Thanks for addressing the comments. There are still few threads from previous review I think would be best to address now as this is already a breaking change from the original instrumentation and doing it later will be yet another breaking change for users.
If you prefer that we leave it as is, and address these less trivial cases sometime else, that is also ok with me.
cc @blumamir - I would appreciate you having another look if you find some time 🙂 |
@pichlermarc Added @t2t2 and @mhennoch as additional component owners, getting more people to help out with JS contrib, especially for the upcoming and/or ported instrumentations. |
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.
Looks good, thank you for working on this. 🙌
@t2t2 @mhennoch - thank you for joining as owners (I assume @seemk has reached out offline), please indicate that you're okay with this by approving the PR. 🙂
I'll leave this open for @blumamir to take a look until Monday - if there are no more comments by then I will merge this PR. 🙂
@seemk conflicts need to be resovled one last time then this is good to merge 🙂 |
@pichlermarc Thanks, there's one job that failed due to |
@pichlermarc Nvm, pushed an empty commit to trigger it |
Short description of the changes
Adds the typeorm instrumentation created by Aspecto.
Only contains minor changes: upgraded to the latest SDK and semantic conventions package, modified the tests to use
assert
, changed the hook type signature.