You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using OpenTelemetry in a LoopBack 4 application, which connects to a MySQL database and exposes a CRUD API over a database table. LoopBack 4 is built on top of the express, http and mysql libraries, so we are using the instrumentation for these.
What did you expect to see?
We expected to see a single trace for each HTTP request to the LoopBack 4 application, containing various spans - including a span for the request to the MySQL database.
What did you see instead?
We see two traces for each HTTP request to the LoopBack 4 application, one with all the HTTP spans, and another with just the MySQL span.
Additional context
I believe that this problem occurs as the context is getting lost when requesting a connection from the connection pool. I have a patch for the instrumentation code that fixes the problem by binding the callback for getConnection to the active context before passing it into the instrumented code.
The text was updated successfully, but these errors were encountered:
What version of OpenTelemetry are you using?
^0.21.0
What version of Node are you using?
v14.17.1
What did you do?
We are using OpenTelemetry in a LoopBack 4 application, which connects to a MySQL database and exposes a CRUD API over a database table. LoopBack 4 is built on top of the
express
,http
andmysql
libraries, so we are using the instrumentation for these.What did you expect to see?
We expected to see a single trace for each HTTP request to the LoopBack 4 application, containing various spans - including a span for the request to the MySQL database.
What did you see instead?
We see two traces for each HTTP request to the LoopBack 4 application, one with all the HTTP spans, and another with just the MySQL span.
Additional context
I believe that this problem occurs as the context is getting lost when requesting a connection from the connection pool. I have a patch for the instrumentation code that fixes the problem by binding the callback for
getConnection
to the active context before passing it into the instrumented code.The text was updated successfully, but these errors were encountered: