Package zipkin2

Class SpanBytesDecoderDetector


  • public final class SpanBytesDecoderDetector
    extends java.lang.Object
    Detecting decoder used in transports which don't include means to identify the type of the data.

    For example, we can identify the encoding and also the format in http via the request path and content-type. However, in Kafka it could be that folks send mixed Zipkin data without identifying its format. For example, Kafka historically has no content-type and users don't always segregate different queues by instrumentation format.

    • Method Detail

      • decoderForMessage

        public static BytesDecoder<Span> decoderForMessage​(byte[] span)
        Throws:
        java.lang.IllegalArgumentException - if the input isn't a v1 json or thrift single-span message
      • decoderForListMessage

        public static BytesDecoder<Span> decoderForListMessage​(byte[] spans)
        Throws:
        java.lang.IllegalArgumentException - if the input isn't a json, proto3 or thrift list message.
      • decoderForListMessage

        public static BytesDecoder<Span> decoderForListMessage​(java.nio.ByteBuffer spans)