Skip to content

"format is not a function" error when using mysql2 instrumentation with kysely #1511

Open
sidorares/node-mysql2
#3081
@jballentine-sharpen

Description

@jballentine-sharpen

Is your instrumentation request related to a problem? Please describe

Kysely currently breaks when using OpenTelemetry. When I attempt to execute a query, I get an error of TypeError: format is not a function as well as some warnings of Warning: Accessing non-existent property 'format' of module exports inside circular dependency, with the error coming from @opentelemetry/instrumentation-mysql2/src/utils.ts:105:21. and caused by kysely/dist/esm/dialect/mysql/mysql-driver.js:117:33

It appears the mysql instrumentation breaks Kysely functionality. It would be great to be able to use both Kysely and otel without this conflict.

Is it applicable for Node or Browser or both?

Node

Do you expect this instrumentation to be commonly used?

Weekly Downloads: 59,839

What version of instrumentation are you interested in using?

Versions: Latest?

Additional context

I think instrumentation would just work as it uses mysql/pg under the hood, it just needs this conflict to be resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds:reproducerThis bug/feature is in need of a minimal reproducerpkg:instrumentation-mysql2priority:p1Bugs which cause problems in end-user applications such as crashes, data inconsistencies

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions