Class: OpenTelemetry::SDK::Trace::SpanData

Inherits:
Struct
  • Object
show all
Defined in:
lib/opentelemetry/sdk/trace/span_data.rb

Overview

SpanData is a Struct containing Span data for export.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes

Returns:

  • (Object)

    the current value of attributes



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def attributes
  @attributes
end

#end_timestampObject

Returns the value of attribute end_timestamp

Returns:

  • (Object)

    the current value of end_timestamp



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def end_timestamp
  @end_timestamp
end

#eventsObject

Returns the value of attribute events

Returns:

  • (Object)

    the current value of events



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def events
  @events
end

#instrumentation_libraryObject

Returns the value of attribute instrumentation_library

Returns:

  • (Object)

    the current value of instrumentation_library



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def instrumentation_library
  @instrumentation_library
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def kind
  @kind
end

Returns the value of attribute links

Returns:

  • (Object)

    the current value of links



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def links
  @links
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def name
  @name
end

#parent_span_idObject

Returns the value of attribute parent_span_id

Returns:

  • (Object)

    the current value of parent_span_id



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def parent_span_id
  @parent_span_id
end

#resourceObject

Returns the value of attribute resource

Returns:

  • (Object)

    the current value of resource



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def resource
  @resource
end

#span_idObject

Returns the value of attribute span_id

Returns:

  • (Object)

    the current value of span_id



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def span_id
  @span_id
end

#start_timestampObject

Returns the value of attribute start_timestamp

Returns:

  • (Object)

    the current value of start_timestamp



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def start_timestamp
  @start_timestamp
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def status
  @status
end

#total_recorded_attributesObject

Returns the value of attribute total_recorded_attributes

Returns:

  • (Object)

    the current value of total_recorded_attributes



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def total_recorded_attributes
  @total_recorded_attributes
end

#total_recorded_eventsObject

Returns the value of attribute total_recorded_events

Returns:

  • (Object)

    the current value of total_recorded_events



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def total_recorded_events
  @total_recorded_events
end

Returns the value of attribute total_recorded_links

Returns:

  • (Object)

    the current value of total_recorded_links



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def total_recorded_links
  @total_recorded_links
end

#trace_flagsObject

Returns the value of attribute trace_flags

Returns:

  • (Object)

    the current value of trace_flags



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def trace_flags
  @trace_flags
end

#trace_idObject

Returns the value of attribute trace_id

Returns:

  • (Object)

    the current value of trace_id



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def trace_id
  @trace_id
end

#tracestateObject

Returns the value of attribute tracestate

Returns:

  • (Object)

    the current value of tracestate



13
14
15
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 13

def tracestate
  @tracestate
end

Instance Method Details

#hex_parent_span_idString

Returns the lowercase hex encoded parent span ID.

Returns:

  • (String)

    A 16-hex-character lowercase string.



48
49
50
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 48

def hex_parent_span_id
  parent_span_id.unpack1('H*')
end

#hex_span_idString

Returns the lowercase hex encoded span ID.

Returns:

  • (String)

    A 16-hex-character lowercase string.



34
35
36
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 34

def hex_span_id
  span_id.unpack1('H*')
end

#hex_trace_idString

Returns the lowercase hex encoded trace ID.

Returns:

  • (String)

    A 32-hex-character lowercase string.



41
42
43
# File 'lib/opentelemetry/sdk/trace/span_data.rb', line 41

def hex_trace_id
  trace_id.unpack1('H*')
end