pub fn span_v1_to_span_v2(span_v1: Span, infer_name: bool) -> SpanV2Expand description
Converts a legacy span to the new Span V2 schema.
tags,sentry_tags,measurementsanddataare transferred toattributes.- Nested
dataitems are encoded as JSON.
Measurements are converted to attributes by looking up the
replacement attribute’s name in sentry-conventions.
infer_name controls whether the span’s name is inferred based on its attributes.
Only enable it if the source span has gone through PII scrubbing, otherwise the name
might end up containing PII that doesn’t get scrubbed later!