Sha256: b7bdea83f439df63db336f28922edb40338580befd82b83a14173ef32eca6b00

Contents?: true

Size: 561 Bytes

Versions: 1

Compression:

Stored size: 561 Bytes

Contents

# frozen_string_literal: true

# Copyright 2019 OpenTelemetry Authors
#
# SPDX-License-Identifier: Apache-2.0

module OpenTelemetry
  module DistributedContext
    module Propagation
      # Formatter for serializing and deserializing a SpanContext into a binary format.
      class BinaryFormat
        EMPTY_BYTE_ARRAY = [].freeze

        private_constant(:EMPTY_BYTE_ARRAY)

        def to_bytes(span_context)
          EMPTY_BYTE_ARRAY
        end

        def from_bytes(bytes)
          Trace::SpanContext.invalid
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
opentelemetry-api-0.2.0 lib/opentelemetry/distributed_context/propagation/binary_format.rb