stream_subsegments

in lib/aws-xray-sdk/streaming/default_streamer.rb [24:47]


    def stream_subsegments(root:, emitter:)
      children = root.subsegments
      children_ready = []

      unless children.empty?
        
        children.each do |child|
          children_ready << child if stream_subsegments root: child, emitter: emitter
        end
      end

      
      
      return true if children_ready.length == children.length && root.closed?
      
      
      children_ready.each do |child|
        root.remove_subsegment subsegment: child
        emitter.send_entity entity: child
      end
      
      false
    end