diff --git a/source/code-snippets/monitoring/apm-subscribe.js b/source/code-snippets/monitoring/apm-subscribe.js index 10251165..fb53b757 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 {