Class BinaryFormatImpl


  • final class BinaryFormatImpl
    extends BinaryFormat
    Implementation of the BinaryFormat.

    BinaryFormat format:

    • Binary value: <version_id><version_format>
    • version_id: 1-byte representing the version id.
    • For version_id = 0:
      • version_format: <field><field>
      • field_format: <field_id><field_format>
      • Fields:
        • TraceId: (field_id = 0, len = 16, default = "0000000000000000") - 16-byte array representing the trace_id.
        • SpanId: (field_id = 1, len = 8, default = "00000000") - 8-byte array representing the span_id.
        • TraceOptions: (field_id = 2, len = 1, default = "0") - 1-byte array representing the trace_options.
      • Fields MUST be encoded using the field id order (smaller to higher).
      • Valid value example:
        • {0, 0, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 1, 97, 98, 99, 100, 101, 102, 103, 104, 2, 1}
        • version_id = 0;
        • trace_id = {64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79}
        • span_id = {97, 98, 99, 100, 101, 102, 103, 104};
        • trace_options = {1};