relay icon indicating copy to clipboard operation
relay copied to clipboard

feat(spans): Accept V2 spans and convert them to V1 spans

Open loewenheim opened this issue 7 months ago • 4 comments

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

loewenheim avatar May 26 '25 11:05 loewenheim

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.

loewenheim avatar May 26 '25 15:05 loewenheim

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?

loewenheim avatar May 27 '25 13:05 loewenheim

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.

Dav1dde avatar May 27 '25 14:05 Dav1dde

I'll remove all of the outcome/category logic changes for now, they only confuse the issue.

loewenheim avatar May 28 '25 10:05 loewenheim