Function otel_to_sentry_span_v2

Source
pub fn otel_to_sentry_span_v2(
    otel_span: Span,
    resource: Option<&Resource>,
    scope: Option<&InstrumentationScope>,
) -> SpanV2
Expand description

Transform an OTEL span to a Sentry span V2.

This uses attributes in the OTEL span to populate various fields in the Sentry span.

  • The Sentry span’s name field may be set based on db or http attributes if the OTEL span’s name is empty.
  • The Sentry span’s sentry.description attribute may be set based on db or http attributes if the OTEL span’s sentry.description attribute is empty.

All other attributes are carried over from the OTEL span to the Sentry span.