Class SpanDataConverter

java.lang.Object
codes.grow.packages.skywalking.testing.tracing.SpanDataConverter

public final class SpanDataConverter extends Object
Converts OpenTelemetry SDK SpanData into the normalized query Span.
  • Method Details

    • toSpan

      public static Span toSpan(io.opentelemetry.sdk.trace.data.SpanData data)
      Converts one span.
      Parameters:
      data - SDK span data
      Returns:
      normalized span (serviceName from the resource's service.name)
    • attributes

      public static Map<String,Object> attributes(io.opentelemetry.api.common.Attributes attributes)
      Converts OpenTelemetry attributes into attribute values (arrays become lists).
      Parameters:
      attributes - OTel attributes
      Returns:
      ordered map