From 2f93ff9bba4b8cf548be19d7f01b43be40075699 Mon Sep 17 00:00:00 2001 From: Michael Morisi Date: Wed, 14 Aug 2024 13:21:25 -0400 Subject: [PATCH] DOCSP-42530: Fix code sample --- source/code-snippets/monitoring/apm-subscribe.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/code-snippets/monitoring/apm-subscribe.js b/source/code-snippets/monitoring/apm-subscribe.js index 10251165c..fb53b757c 100644 --- a/source/code-snippets/monitoring/apm-subscribe.js +++ b/source/code-snippets/monitoring/apm-subscribe.js @@ -11,9 +11,7 @@ const client = new MongoClient(uri, { monitorCommands:true }); const eventName = ""; // Subscribe to a specified event and print a message when the event is received -client.on(eventName, event => { - console.log(`received ${eventName}: ${JSON.stringify(event, null, 2)}`); -}); +client.on(eventName, event => console.log(event)); async function run() { try {