Class: XRay::LambdaRecorder

Inherits:
Recorder show all
Includes:
Logging
Defined in:
lib/aws-xray-sdk/lambda/lambda_recorder.rb

Instance Attribute Summary

Attributes inherited from Recorder

#config, #origin

Instance Method Summary collapse

Methods included from Logging

#logger, logger, logger=

Methods inherited from Recorder

#annotations, #begin_subsegment, #capture, #clear_context, #configure, #context, #current_entity, #current_segment, #current_subsegment, #emitter, #end_subsegment, #initialize, #inject_context, #metadata, #populate_runtime_context, #sampled?, #sampler, #sampling_enabled?, #segment_naming, #streamer

Constructor Details

This class inherits a constructor from XRay::Recorder

Instance Method Details

#begin_segment(name, trace_id: nil, parent_id: nil, sampled: nil) ⇒ Object



7
8
9
10
11
# File 'lib/aws-xray-sdk/lambda/lambda_recorder.rb', line 7

def begin_segment(name, trace_id: nil, parent_id: nil, sampled: nil)
  # no-op
  logger.warn('Cannot create segments inside Lambda function. Returning current segment.')
  return current_segment
end

#end_segment(end_time: nil) ⇒ Object



13
14
15
16
17
# File 'lib/aws-xray-sdk/lambda/lambda_recorder.rb', line 13

def end_segment(end_time: nil)
  # no-op
  logger.warn('Cannot end segment inside Lambda function. Ignored.')
  nil
end