Sha256: 99922013f3322f259d85f13736d8d616e47d17a76de0dbec4054a262d735d3a7

Contents?: true

Size: 1.89 KB

Versions: 1

Compression:

Stored size: 1.89 KB

Contents

# frozen_string_literal: true

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

module OpenTelemetry
  module SDK
    # The Trace module contains the OpenTelemetry tracing reference
    # implementation.
    module Trace
      # SpanData is a Struct containing {Span} data for export.
      SpanData = Struct.new(:name,
                            :kind,
                            :status,
                            :parent_span_id,
                            :child_count,
                            :total_recorded_attributes,
                            :total_recorded_events,
                            :total_recorded_links,
                            :start_timestamp,
                            :end_timestamp,
                            :attributes,
                            :links,
                            :events,
                            :resource,
                            :instrumentation_library,
                            :span_id,
                            :trace_id,
                            :trace_flags,
                            :tracestate) do
                              # Returns the lowercase [hex encoded](https://tools.ietf.org/html/rfc4648#section-8) span ID.
                              #
                              # @return [String] A 16-hex-character lowercase string.
                              def hex_span_id
                                span_id.unpack1('H*')
                              end

                              # Returns the lowercase [hex encoded](https://tools.ietf.org/html/rfc4648#section-8) trace ID.
                              #
                              # @return [String] A 32-hex-character lowercase string.
                              def hex_trace_id
                                trace_id.unpack1('H*')
                              end
                            end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
opentelemetry-sdk-0.6.0 lib/opentelemetry/sdk/trace/span_data.rb