instrumentation-knex table calculated incorrectly on nested tables #1535
Labels
bug
Something isn't working
has:reproducer
This bug/feature has a minimal reproduction provided
pkg:instrumentation-knex
priority:p2
Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
What version of OpenTelemetry are you using?
@opentelemetry/instrumentation: 0.39.1
What version of Node are you using?
16.14.0
What did you do?
Used opentelemetry-knex and with nested queries, it misbehaves, potentially generating a long span name.
See nachogiljaldo@9521964 for reproduction steps.
What did you expect to see?
The code should work somewhat recursively to find the first table. And return a table (and not a subquery as was the case).
What did you see instead?
the variable table was set to be a queryBuilder, when serialized that resulted on the whole query
Additional context
The linked commit adds a potential solution, if the solution looks good I'm happy to create a PR out of it.
The text was updated successfully, but these errors were encountered: