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



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



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



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

def events
  @events
end

#instrumentation_scopeObject Also known as: instrumentation_library

Returns the value of attribute instrumentation_scope



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

def instrumentation_scope
  @instrumentation_scope
end

#kindObject

Returns the value of attribute kind



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

def kind
  @kind
end

Returns the value of attribute 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



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



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

def parent_span_id
  @parent_span_id
end

#parent_span_is_remoteObject

Returns the value of attribute parent_span_is_remote



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

def parent_span_is_remote
  @parent_span_is_remote
end

#resourceObject

Returns the value of attribute 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



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



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



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



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



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



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



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



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



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.



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

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

#hex_span_idString

Returns the lowercase hex encoded span ID.



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

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

#hex_trace_idString

Returns the lowercase hex encoded trace ID.



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

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