In terms of activity and tracing, we want to have each processed event to have the same parentId. That's not what was currently hapening. Currently every event would have the previous processed event as parent which would produce a trace similar to this:
But really what we want is something that looks like this:
|-- Parent Activity
| |-- Handle request A
| |-- Handle request B
What changed
There seemed to be some problem with the disposal of the activity which was making it be referenced beyond it's using block and into the next processing block. In order to remedy this, the following changes were made:
Moved using statement from HandleWithTracing to HandleAsync (This alone fixed the issue that could be clearly seen in Honeycomb for example)
Context
In terms of activity and tracing, we want to have each processed event to have the same parentId. That's not what was currently hapening. Currently every event would have the previous processed event as parent which would produce a trace similar to this:
But really what we want is something that looks like this:
What changed
There seemed to be some problem with the disposal of the activity which was making it be referenced beyond it's using block and into the next processing block. In order to remedy this, the following changes were made:
Moved using statement from HandleWithTracing to HandleAsync (This alone fixed the issue that could be clearly seen in Honeycomb for example)