-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Command Logging and Monitoring
-
None
Today I wanted to use command monitoring to prove that a command was sent to a secondary, so I thought I'd so something like:
const client = new MongoClient(..., { monitorCommands: true }); const bag = []; client.on('commandStarted', filterForCommands(['count'], bag)); await client.connect(); await client.collection.find().count(); const td = client.topology.description; const sd = td.servers.get(bag[0].address); ...
Except this doesn't work for me on localhost because the TopologyDescription has all the servers listed by their seed names (localhost:31000, localhost:31001, localhost:31002) but the command monitoring event uses a resolved address of the connection (127.0.0.1:31002).
We should ensure that people can trace commands consistently across all of our events.
- is related to
-
NODE-2671 ipv6 is not supported when using dns service discovering
- Closed