Skip to content

Commit

Permalink
Change the calculation of parent spans (#9)
Browse files Browse the repository at this point in the history
* Change the calculation of parent spans

Add a "entered" stack to keep track of enter span/exit span in the
channel read thread rather than the sender.

This allows parent spans to be calculated based on the items in the
stack rather than solely based on enter/exit states.

* Automatically push trace parent span

Now it is no longer necessary to decide on the parent; it will
automatically be pushed when a new trace is started (first span where
span collection is empty for the given trace ID).  This parent wil be
re-calculated if all events are sent on a trace (because the current
span collection for that trace will be consumed and further create
events will create a whole new span collection, including a new parent.

Now, draining a span collection consumes it, so it can no longer be used
once the "send_trace" event is received for a trace.
  • Loading branch information
kitsuneninetails authored Jun 7, 2020
1 parent 79defa8 commit 5f3a0c0
Showing 1 changed file with 152 additions and 59 deletions.
Loading

0 comments on commit 5f3a0c0

Please sign in to comment.