Enum Class OtlpProtocol

java.lang.Object
java.lang.Enum<OtlpProtocol>
codes.grow.packages.skywalking.OtlpProtocol
All Implemented Interfaces:
Serializable, Comparable<OtlpProtocol>, Constable

public enum OtlpProtocol extends Enum<OtlpProtocol>
OTLP protocol of the trace exporter. OAP 10.4 serves OTLP over gRPC only; HTTP_PROTOBUF is for an OpenTelemetry Collector in front of OAP.
  • Enum Constant Details

    • GRPC

      public static final OtlpProtocol GRPC
      OTLP/gRPC (default, OAP port 11800).
    • HTTP_PROTOBUF

      public static final OtlpProtocol HTTP_PROTOBUF
      OTLP/HTTP with protobuf bodies (collector only).
  • Method Details

    • values

      public static OtlpProtocol[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OtlpProtocol valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • wireValue

      public String wireValue()
      Wire value.
      Returns:
      grpc or http/protobuf
    • toTracingProtocol

      public TracingConfig.Protocol toTracingProtocol()
      Returns:
      the tracing protocol
    • parse

      public static OtlpProtocol parse(String text, String source)
      Parses a wire value (case-insensitive).
      Parameters:
      text - grpc or http/protobuf
      source - variable or field name for the error message (never the value)
      Returns:
      the protocol
      Throws:
      ConfigException - for any other value