Class: Skywalking::Tracing::SegmentRef

Inherits:
Object
  • Object
show all
Defined in:
lib/skywalking/tracing/segment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(carrier, ref_type: 'CrossProcess') ⇒ SegmentRef

Returns a new instance of SegmentRef.



45
46
47
48
49
50
51
52
53
54
# File 'lib/skywalking/tracing/segment.rb', line 45

def initialize(carrier, ref_type: 'CrossProcess')
  @ref_type = ref_type
  @trace_id = carrier.trace_id
  @segment_id = carrier.segment_id
  @span_id = carrier.span_id.to_i
  @service = carrier.service
  @service_instance = carrier.service_instance
  @endpoint = carrier.endpoint
  @peer = carrier.peer
end

Instance Attribute Details

#endpointObject (readonly)

Returns the value of attribute endpoint.



41
42
43
# File 'lib/skywalking/tracing/segment.rb', line 41

def endpoint
  @endpoint
end

#peerObject (readonly)

Returns the value of attribute peer.



41
42
43
# File 'lib/skywalking/tracing/segment.rb', line 41

def peer
  @peer
end

#ref_typeObject (readonly)

Returns the value of attribute ref_type.



41
42
43
# File 'lib/skywalking/tracing/segment.rb', line 41

def ref_type
  @ref_type
end

#segment_idObject (readonly)

Returns the value of attribute segment_id.



41
42
43
# File 'lib/skywalking/tracing/segment.rb', line 41

def segment_id
  @segment_id
end

#serviceObject (readonly)

Returns the value of attribute service.



41
42
43
# File 'lib/skywalking/tracing/segment.rb', line 41

def service
  @service
end

#service_instanceObject (readonly)

Returns the value of attribute service_instance.



41
42
43
# File 'lib/skywalking/tracing/segment.rb', line 41

def service_instance
  @service_instance
end

#span_idObject (readonly)

Returns the value of attribute span_id.



41
42
43
# File 'lib/skywalking/tracing/segment.rb', line 41

def span_id
  @span_id
end

#trace_idObject (readonly)

Returns the value of attribute trace_id.



41
42
43
# File 'lib/skywalking/tracing/segment.rb', line 41

def trace_id
  @trace_id
end