Class: XRay::FacadeSegment

Inherits:
Segment
  • Object
show all
Defined in:
lib/aws-xray-sdk/lambda/facade_segment.rb

Defined Under Namespace

Classes: ImmutableEmptyCollection

Constant Summary

Constants included from Entity

Entity::HTTP_REQUEST_KEY, Entity::HTTP_RESPONSE_KEY

Instance Attribute Summary

Attributes inherited from Segment

#origin, #ref_counter, #service, #subsegment_size, #user

Attributes included from Entity

#aws, #cause, #end_time, #error, #exception, #fault, #http_request, #http_response, #name, #namespace, #parent, #sampled, #start_time, #throttle

Instance Method Summary collapse

Methods inherited from Segment

#add_subsegment, #decrement_ref_counter, #remove_subsegment, #sampling_rule_name=, #segment, #to_h, #trace_id

Methods included from Entity

#add_subsegment, #cause_id, #closed?, #id, #remove_subsegment, #subsegments, #to_h, #to_json

Constructor Details

#initialize(trace_id: nil, name: nil, parent_id: nil, id: nil, sampled: true) ⇒ FacadeSegment

Returns a new instance of FacadeSegment.



23
24
25
26
27
28
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 23

def initialize(trace_id: nil, name: nil, parent_id: nil, id: nil, sampled: true)
  super(trace_id: trace_id, name: name, parent_id: parent_id)
  @id = id
  @sampled = sampled
  @empty_collection = ImmutableEmptyCollection.new
end

Instance Method Details

#add_exception(exception:, remote: false) ⇒ Object



49
50
51
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 49

def add_exception(exception:, remote: false)
  raise UnsupportedOperationError
end

#annotationsObject

Annotations are read only



97
98
99
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 97

def annotations
  @empty_collection
end

#apply_status_code(status:) ⇒ Object



40
41
42
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 40

def apply_status_code(status:)
  raise UnsupportedOperationError
end

#aws=(value) ⇒ Object



71
72
73
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 71

def aws=(value)
  raise UnsupportedOperationError
end

#close(end_time: nil) ⇒ Object

Methods from Entity that are not supported



37
38
39
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 37

def close(end_time: nil)
  raise UnsupportedOperationError
end

#end_time=(value) ⇒ Object



77
78
79
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 77

def end_time=(value)
  raise UnsupportedOperationError
end

#error=(value) ⇒ Object



62
63
64
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 62

def error=(value)
  raise UnsupportedOperationError
end

#fault=(value) ⇒ Object



65
66
67
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 65

def fault=(value)
  raise UnsupportedOperationError
end

#merge_http_request(request:) ⇒ Object



43
44
45
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 43

def merge_http_request(request:)
  raise UnsupportedOperationError
end

#merge_http_response(response:) ⇒ Object



46
47
48
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 46

def merge_http_response(response:)
  raise UnsupportedOperationError
end

#metadata(namespace: :default) ⇒ Object

Metadata is read only



104
105
106
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 104

def (namespace: :default)
  @empty_collection
end

#origin=(value) ⇒ Object

Mutation accessors from Segment that are not supported



84
85
86
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 84

def origin=(value)
  raise UnsupportedOperationError
end

#parent=(value) ⇒ Object

Mutation accessors from Entity that are not supported



56
57
58
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 56

def parent=(value)
  raise UnsupportedOperationError
end

#ready_to_send?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 30

def ready_to_send?
  false #never send this facade. AWS Lambda has already created a Segment with these ids
end

#sampled=(value) ⇒ Object



68
69
70
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 68

def sampled=(value)
  raise UnsupportedOperationError
end

#service=(value) ⇒ Object



90
91
92
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 90

def service=(value)
  raise UnsupportedOperationError
end

#start_time=(value) ⇒ Object



74
75
76
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 74

def start_time=(value)
  raise UnsupportedOperationError
end

#throttle=(value) ⇒ Object



59
60
61
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 59

def throttle=(value)
  raise UnsupportedOperationError
end

#user=(value) ⇒ Object



87
88
89
# File 'lib/aws-xray-sdk/lambda/facade_segment.rb', line 87

def user=(value)
  raise UnsupportedOperationError
end