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
xr0master
changed the title
[@sentry/tracing][express] Spin is lost for last middleware
[@sentry/tracing][express] Span is lost for last middleware
Oct 27, 2020
Uh oh!
There was an error while loading. Please reload this page.
issue
It happens because of event
finish
order.In handler:
https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/handlers.ts#L65
In express
https://github.com/getsentry/sentry-javascript/blob/master/packages/tracing/src/integrations/express.ts#L121
The
handlers
listener fires beforeexpress
, as result the last spin has been filtered in:https://github.com/getsentry/sentry-javascript/blob/master/packages/tracing/src/transaction.ts#L90
because the last span still doesn't have the
endTimestamp
2 options to fix this issue:
close
listener instead offinish
inhandlers.ts
. Theclose
event runs afterfinish
.transaction.finish();
runsLet me know which option is best for you.
The text was updated successfully, but these errors were encountered: