class ElasticAPM::Subscriber

def finish(_name, id, _payload)

def finish(_name, id, _payload)
  # debug "AS::Notification#finish:#{name}:#{id}"
  return unless (transaction = @agent.current_transaction)
  while (notification = transaction.notifications.pop)
    next unless notification.id == id
    if (span = notification.span)
      @agent.end_span if span == @agent.current_span
    end
    return
  end
end