[SERVER-83926] Do not include 'mongos' section of client info on mongos Created: 06/Dec/23  Updated: 19/Dec/23  Resolved: 19/Dec/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Memento Slack Bot Assignee: Charlie Swanson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-85096 TRACKING: M3 Correctness Tickets Closed
Backwards Compatibility: Minor Change
Participants:

 Description   

In this example, you can see that the $queryStats stage returns information about the mongos:

db.getSiblingDB("admin").aggregate([{$queryStats:{}},{$match: {"key.queryShape.cmdNs.coll":"config.monitoring.agentSessions","key.client.application.name":/Shell/,"key.$readPreference":null}},{$project:{"key.client.mongos":1}}]).pretty()
{
	"key" : {
		"client" : {
			"mongos" : {
				"host" : "[atlas-d9q8oq-shard-00-01.yqitg.mmscloudteam.com:27016|http://atlas-d9q8oq-shard-00-01.yqitg.mmscloudteam.com:27016]",
				"client" : "173.63.102.138:64387",
				"version" : "7.2.0-rc1"
			}
		}
	}
}

This includes IP addresses and ports which are likely too specific and high-cardinality, so we should remove this whole "mongos" section for the $queryStats output.



 Comments   
Comment by Githook User [ 19/Dec/23 ]

Author:

{'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com', 'username': 'cswanson310'}

Message: SERVER-83926 Do not include mongos info in query stats' client metadata

GitOrigin-RevId: 1749a8bb4eca6e7072746716682dab5e8554c6e1
Branch: master
https://github.com/mongodb/mongo/commit/bdcdf062fc7dc6484e4ee3b3b2c2330d2a0c2577

Generated at Thu Feb 08 06:53:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.