pub fn span_v2_to_span_v1(span_v2: SpanV2) -> Span
Expand 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
op
field will be set based on the V2 span’ssentry.op
attribute, or inferred from other attributes if thesentry.op
attribute is not set. - The V1 span’s
description
field will be set based on the V2 span’ssentry.description
attribute, or inferred from other attributes if thesentry.description
attribute is not set. - The V1 span’s
description
field is set based on the V2 span’ssentry.description
attribute. - The V1 span’s
status
field is set based on the V2 span’sstatus
field andhttp.status_code
andrpc.grpc.status_code
attributes. - The V1 span’s
exclusive_time
field is set based on the V2 span’sexclusive_time_nano
attribute, or the difference between the start and end timestamp if that attribute is not set. - The V1 span’s
platform
field is set based on the V2 span’ssentry.platform
attribute. - The V1 span’s
profile_id
field is set based on the V2 span’ssentry.profile.id
attribute. - The V1 span’s
segment_id
field is set based on the V2 span’ssentry.segment.id
attribute.
All other attributes are carried over from the V2 span to the V1 span’s data
.