Class: Instana::Exporter::Otlp::BaseConverter::SpanData

Inherits:
Struct
  • Object
show all
Defined in:
lib/instana/exporter/otlp/base_converter.rb

Overview

Plain object that directly implements the interface expected by OpenTelemetry::Exporter::OTLP::Exporter#export

This is a simple data structure with the required methods, avoiding unnecessary delegation overhead.

Constant Summary collapse

EMPTY_ARRAY =

rubocop:disable Lint/ConstantDefinitionInBlock

[].freeze

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



56
57
58
# File 'lib/instana/exporter/otlp/base_converter.rb', line 56

def attributes
  @attributes
end

#end_timestampObject

Returns the value of attribute end_timestamp

Returns:

  • (Object)

    the current value of end_timestamp



56
57
58
# File 'lib/instana/exporter/otlp/base_converter.rb', line 56

def end_timestamp
  @end_timestamp
end

#instrumentation_scopeObject

Returns the value of attribute instrumentation_scope

Returns:

  • (Object)

    the current value of instrumentation_scope



56
57
58
# File 'lib/instana/exporter/otlp/base_converter.rb', line 56

def instrumentation_scope
  @instrumentation_scope
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



56
57
58
# File 'lib/instana/exporter/otlp/base_converter.rb', line 56

def kind
  @kind
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



56
57
58
# File 'lib/instana/exporter/otlp/base_converter.rb', line 56

def name
  @name
end

#parent_span_idObject

Returns the value of attribute parent_span_id

Returns:

  • (Object)

    the current value of parent_span_id



56
57
58
# File 'lib/instana/exporter/otlp/base_converter.rb', line 56

def parent_span_id
  @parent_span_id
end

#resourceObject

Returns the value of attribute resource

Returns:

  • (Object)

    the current value of resource



56
57
58
# File 'lib/instana/exporter/otlp/base_converter.rb', line 56

def resource
  @resource
end

#span_idObject

Returns the value of attribute span_id

Returns:

  • (Object)

    the current value of span_id



56
57
58
# File 'lib/instana/exporter/otlp/base_converter.rb', line 56

def span_id
  @span_id
end

#start_timestampObject

Returns the value of attribute start_timestamp

Returns:

  • (Object)

    the current value of start_timestamp



56
57
58
# File 'lib/instana/exporter/otlp/base_converter.rb', line 56

def start_timestamp
  @start_timestamp
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



56
57
58
# File 'lib/instana/exporter/otlp/base_converter.rb', line 56

def status
  @status
end

#trace_idObject

Returns the value of attribute trace_id

Returns:

  • (Object)

    the current value of trace_id



56
57
58
# File 'lib/instana/exporter/otlp/base_converter.rb', line 56

def trace_id
  @trace_id
end

Instance Method Details

#eventsArray

Returns Empty array — error-free spans carry no events.

Returns:

  • (Array)

    Empty array — error-free spans carry no events



81
82
83
# File 'lib/instana/exporter/otlp/base_converter.rb', line 81

def events
  EMPTY_ARRAY
end

Returns Empty array (links not currently supported).

Returns:

  • (Array)

    Empty array (links not currently supported)



91
92
93
# File 'lib/instana/exporter/otlp/base_converter.rb', line 91

def links
  EMPTY_ARRAY
end

#parent_span_is_remoteBoolean

Returns False (remote parent detection not implemented).

Returns:

  • (Boolean)

    False (remote parent detection not implemented)



101
102
103
# File 'lib/instana/exporter/otlp/base_converter.rb', line 101

def parent_span_is_remote
  false
end

#total_recorded_attributesInteger

Returns Number of attributes recorded.

Returns:

  • (Integer)

    Number of attributes recorded



76
77
78
# File 'lib/instana/exporter/otlp/base_converter.rb', line 76

def total_recorded_attributes
  attributes.size
end

#total_recorded_eventsInteger

Returns Zero — no events on error-free spans.

Returns:

  • (Integer)

    Zero — no events on error-free spans



86
87
88
# File 'lib/instana/exporter/otlp/base_converter.rb', line 86

def total_recorded_events
  0
end

Returns Zero (links not currently supported).

Returns:

  • (Integer)

    Zero (links not currently supported)



96
97
98
# File 'lib/instana/exporter/otlp/base_converter.rb', line 96

def total_recorded_links
  0
end

#trace_flagsOpenTelemetry::Trace::TraceFlags

Returns Default trace flags.

Returns:

  • (OpenTelemetry::Trace::TraceFlags)

    Default trace flags



106
107
108
# File 'lib/instana/exporter/otlp/base_converter.rb', line 106

def trace_flags
  OpenTelemetry::Trace::TraceFlags::DEFAULT
end

#tracestateOpenTelemetry::Trace::Tracestate

Returns Default empty tracestate.

Returns:

  • (OpenTelemetry::Trace::Tracestate)

    Default empty tracestate



71
72
73
# File 'lib/instana/exporter/otlp/base_converter.rb', line 71

def tracestate
  OpenTelemetry::Trace::Tracestate::DEFAULT
end