-
Hi, I'm trying to track performance for graphile worker in node js. The nicest way would be to hook into the events emitter that gets configured with graphile:
However, the transaction doesn't seems to exist, the log Sentry is configured correctly as I see child spans in the UI, they are not attached to any parent span tho. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
To get this working I recommend using Additionally, you will have to store the span instance somewhere to be able to finish it from the other event handler. You could use a WeakMap or pass the events a shared reference that they can write the span to and read the span off of. |
Beta Was this translation helpful? Give feedback.
To get this working I recommend using
startInactiveSpan
, to get aspan
instance, then wrap your event handler code inwithActiveSpan(span, () => { ... })
.Additionally, you will have to store the span instance somewhere to be able to finish it from the other event handler. You could use a WeakMap or pass the events a shared reference that they can write the span to and read the span off of.