Class OtelValues

java.lang.Object
codes.grow.packages.otelcollector.OtelValues

public final class OtelValues extends Object
Converts SDK attribute maps (strings, booleans, longs, doubles, lists and nested maps) to OpenTelemetry Attributes: homogeneous primitive lists become array attributes, nested maps and mixed lists become AnyValue (AttributeKey.valueKey(java.lang.String)) attributes.
  • Method Details

    • attributes

      public static io.opentelemetry.api.common.Attributes attributes(Map<String,?> attributes)
      Converts an attribute map.
      Parameters:
      attributes - attributes (normalized with AttrValues.normalize(java.lang.Object))
      Returns:
      OpenTelemetry attributes
    • value

      public static io.opentelemetry.api.common.Value<?> value(Object v)
      Converts one normalized value to an OpenTelemetry AnyValue.
      Parameters:
      v - value
      Returns:
      the value