Skip to content
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

instrumentation-knex table calculated incorrectly on nested tables #1535

Closed
nachogiljaldo opened this issue Jun 14, 2023 · 0 comments · Fixed by #1537
Closed

instrumentation-knex table calculated incorrectly on nested tables #1535

nachogiljaldo opened this issue Jun 14, 2023 · 0 comments · Fixed by #1537
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

Comments

@nachogiljaldo
Copy link
Contributor

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.

@nachogiljaldo nachogiljaldo added the bug Something isn't working label Jun 14, 2023
@pichlermarc pichlermarc added priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect has:reproducer This bug/feature has a minimal reproduction provided pkg:instrumentation-knex labels Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants