feat(spans): Accept V2 spans and convert them to V1 spans
This implements the conversion of Span V2 items/item containers in envelopes to Span V1. At the start of span::processing::process, if there is a Span V2 container item, it is removed and replaced with individual items for the converted spans. The process function now returns a Result because it rejects envelopes containing more than one Span V2 container (in line with the design; this may be lifted in future).
ref: RELAY-64
After discussion with @Dav1dde it's clear that the conversion/expansion needs to be moved—it needs to happen before inbound filters are applied at the start of process_standalone_spans.
This says #skip-changelog but it occurs to me that this is the first Span V2 related change that might actually deserve an entry, wdyt?
This says #skip-changelog but it occurs to me that this is the first Span V2 related change that might actually deserve an entry, wdyt?
Good idea, as this is effectively the first commit which accepts span v2 envelopes. But maybe call out that this is still highly experimental.
I'll remove all of the outcome/category logic changes for now, they only confuse the issue.