pub fn span_v2_to_span_v1(span_v2: SpanV2) -> SpanExpand description
Transforms a Sentry span V2 to a Sentry span V1.
This uses attributes in the V2 span to populate various fields in the V1 span.
- The V1 span’s
opfield will be set based on the V2 span’ssentry.opattribute, or inferred from other attributes if thesentry.opattribute is not set. - The V1 span’s
descriptionfield will be set based on the V2 span’ssentry.descriptionattribute, or inferred from other attributes if thesentry.descriptionattribute is not set. - The V1 span’s
statusfield is set based on the V2 span’sstatusfield andhttp.status_codeandrpc.grpc.status_codeattributes. attribute, or the difference between the start and end timestamp if that attribute is not set. - The V1 span’s
platformfield is set based on the V2 span’ssentry.platformattribute. - The V1 span’s
profile_idfield is set based on the V2 span’ssentry.profile_idattribute. - The V1 span’s
segment_idfield is set based on the V2 span’ssentry.segment.idattribute.
All other attributes are carried over from the V2 span to the V1 span’s data.