Skip to content

add knex support for 1.x.x and 2.x.x #861

Open
@blumamir

Description

@blumamir

What version of OpenTelemetry are you using?

latest (0.27.1)

What version of Node are you using?

14

What did you do?

Knex instrumentation supports versions >= 0.22.0

export const SUPPORTED_VERSIONS = [
  // use "lib/execution" for runner.js, "lib" for client.js as basepath, latest tested 0.95.6
  '>=0.22.0',
  // use "lib" as basepath
  '>=0.10.0 <0.18.0',
  '>=0.19.0 <0.22.0',
  // use "src" as basepath
  '>=0.18.0 <0.19.0',
];

Knex published version 1.0.0 on 16/01/2022.
When renovate tried to update the version in this PR, tests failed for v1:

  2) Knex instrumentation
       "after each" hook for "should record spans from query builder":
     TypeError: Cannot read property 'schema' of undefined
      at Context.<anonymous> (test/index.test.ts:69:12)
      at processImmediate (internal/timers.js:464:21)
      at process.callbackTrampoline (internal/async_hooks.js:130:17)

and more.

I don't know if it's only the tests, or the instrumentation itself should be updated, but we should examine this and add test-all-versions.
cc @rauno56

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions