In the chapter that you refer to, a man bearing the description of John Barsad enters the Defarge's wine shop and tries to engage Madame Defarge in conversation, encouraging her to reveal any secrets or word of what is really happening among the French peasantry and if they are planning any revolt. The narrator tells us that he was there "to pick up any crumbs he could find or make," and this is something that he tries to do in a very unsubtle fashion, clearly not recognising that he has more than met his match in the character of Madame Defarge. Consider the following exchange and how he makes a fool of himself when he asks about Gaspard's execution:
"I believe," said the spy, dropping his soft voice to a tone that invited confidence, and expressing an injured revolutionary susceptibility in every muscle of his wicked face: "I believe there is much compassion and anger in this neighbourhood, touching the poor fellow? Between ourselves."
"Is there?" asked madame, vacantly.
Barsad therefore makes a fool of himself whilst trying to gain information from Madame Defarge. The irony is clear: whilst he is engaged in this foolhardy activity, Madame Defarge is knitting his name and marking him for execution without him being aware of it.