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
I can confirm that this happens for me, too after looking into a bug report in our Sentry SDK repository. Looking at the code I can see that a bit further below the middleware check, the callback is patched but the span is also ended before the original callback is invoked.
In addition to @jzhou7-atl's question: Shouldn't the span only be ended after the original callback is called and returns?
Hi, I want to verify if this is a bug or intended behavior of the current instrumentation code.
I notice in the instrumentation code: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts#L236-L242
The span is ended right after it is created unless it's a middleware. It does not even measure the sync execution time of the actual handler.
Should it be put after this line to measure the original handle execution time? https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts#L285
I ran a few tests, the time measured for 'request handler' is extremely short, only a couple of microseconds.
Much appreciated for looking into this!
The text was updated successfully, but these errors were encountered: