@opentelemetry/api 1.8.0 produces detached spans from knex.raw() calls #4630
Labels
bug
Something isn't working
needs:reproducer
This bug/feature is in need of a minimal reproducer
pkg:api
priority:p2
Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
What happened?
Steps to Reproduce
Use
@opentelemetry/api
and@opentelemetry/instrumentation-knex
where sql queries executed by knex are nested inside some other trace.Specifically, calling a raw select like so should be nested under the active parent span:
Expected Result
The span produced by
knex.raw
call has parentSpanId set to the parent span ID.Actual Result
The span produced by
knex.raw
call has parentSpanId set toundefined
.Additional Details
This specifically breaks when going from version 1.7.0 to 1.8.0 of the
@opentelemetry/api
package as the only change in the repo.I can provide more details - I can provide a full span object with 1.7.0 and 1.8.0 if that helps or .. I can work on a fully reproducible example. But just wanted to post this in case someone knows what might be going on. We observed in our Honeycomb UI that all knex.raw calls "fell out" of their parent spans after upgrading to 1.8.0.
OpenTelemetry Setup Code
package.json
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: