Implement InvocationSpanContext for user tracing / streaming tail workers
This implements the InvocationSpanContext class. This type holds a tuple of trace ID, invocation ID, and span ID and will be used in support for the updated streaming tail workers implementation. The basic idea is that every top-level request receives a trace ID which is shared across every invocation the occurs within that request. Every individual invocation has a unique invocation ID, and every span within that invocation receives a monotonically increasing span ID.
While this PR does not currently introduce uses of this type, the idea is for all invocations to always have a root InvocationSpanContext and for every child user span created to branch off this root. The current user span then would always have a current InvocationSpanContext that would be propagated outward for all traceable sub requests (generally any subrequest that is not an public internet fetch). A follow up PR will start to introduce the uses and propagation of the span context. This PR only introduces the class impl an the basic test for it. (I'm intentionally breaking this work into smaller incremental PRs to make it easier to review individual chunks).
Don't merge just yet – will review today
Don't merge just yet – will review today
Yep, figured as much. Want to make sure this is going to be good with the work you're doing