-
Notifications
You must be signed in to change notification settings - Fork 619
fix(knex-instrumentation): use correct db system attribute #3206
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
|
|
|
Could you add a test case that illustrates the issue being fixed, and to make sure there isn't a regression in the future ? |
|
This package does not have an assigned component owner and is considered unmaintained. As such this package is in feature-freeze and this PR will be closed with 14 days unless a new owner or a sponsor (a member of @open-telemetry/javascript-approvers) for the feature is found. It is the responsibility of the author to find a sponsor for this feature. |
for users who use a custom dialect themselves or via ORM (example MikroORM)
Done ✅ |
|
I've started the workflows but I'm not sure if this change will be compatible with all the versions supported Update: unit tests pass but we only test with the version set in Run npm run test-all-versions:ci:affected
> opentelemetry-js-contrib@0.1.0 test-all-versions:ci:affected
> npm --loglevel=silent run list:affected | xargs -I {} -t npm run --if-present test-all-versions -w {} |
|
Nice, happy to hear that 👍🏽 |
Which problem is this PR solving?
MikroORM overrides the default postgres client in knex to a
PostreSqlKnexDialect, soKnex.client.config.clientis not a string, but an instance to that dialect class.Therefore, for users of an ORM that does this with knex, the knex instrumentation triggers a bunch of
Invalid attribute set for database.system.namewarnings.Short description of the changes
Use
knex.Client.config.driverNameinstead ofknex.Client.config.clientto derive the DB system attribute:database.system.name(or the deprecated onedatabase.system)