[SERVER-77190] Include the whole client metadata in telemetry key, not just appName Created: 16/May/23  Updated: 07/Feb/24  Resolved: 31/May/23

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

Type: Improvement Priority: Major - P3
Reporter: Charlie Swanson Assignee: Maddie Zechar
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-85099 Tracking: Milestone 1 Closed
is depended on by SERVER-85105 Tracking: PM-2885 Milestone 0 Closed
Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Sprint: QO 2023-05-29
Participants:

 Description   

After discussing the troubles of many internal connections/operations being recorded, we think that tracking the entire client metadata including the driver name and version will be helpful in filtering out the noise.

That would be this thing in the code, and would cause this kind of diff in the output of $queryStats:

{
  cmdNs: {db: "test", coll: "example_coll"},
  command: "find"
  filter: {a: {$gt: "?number"}},
  sort: {a: -1},
- applicationName: "example",
+ client: {
+   application: {name: "example"},
+   driver: {name: "string", version: "string"},
+   os: {type: "string", name: "string", architecture: "string", version: "string"},
+   mongos: {host: "string", client: "string", version: "string"},
+ }
}

Note many fields there are optional: https://github.com/10gen/mongo/blob/253d4ea05ac72c44294293ed8e9b28f473c93862/src/mongo/rpc/metadata/client_metadata.h#L64



 Comments   
Comment by Githook User [ 07/Feb/24 ]

Author:

{'name': 'Erin Zhu', 'email': 'erin.zhu@mongodb.com', 'username': 'erinzhu001'}

Message: SERVER-86298 QueryStats Backport to 7.0 Batch #3

Includes backports of the following
SERVER-76866 change TODO ticket number
SERVER-76557: Keep RequestShapifiers in telemetry store
SERVER-76143 Add missing find command fields to queryStats key
SERVER-75512 key telemetry store on hash rather than BSONObj
SERVER-76947 remove unimplemented tassert for $cursor shapification
SERVER-76427 Rename $telemetry to $queryStats
SERVER-76042 Avoid re-parsing for the purpose of telemetry
SERVER-73152: Aggregation shapification for query stats
SERVER-75597 Include 'crs' in geo serialization with queryStats options
SERVER-76919 add gen command fields to queryStats key
SERVER-77350: Update query stats sampling rate parameter name
SERVER-76555 Stress-test $queryStats in core passthrough
SERVER-77407 uassert on BSONObj or string for $hint field in queryShape
SERVER-77430 Allow coordinates" to be optional"
SERVER-77485 Avoid unnecessary ExpressionContext re-construction
SERVER-77190 Include the whole client metadata in telemetry key, not just appName
SERVER-77626 Exclude test checking opcounters from queryStats suite
SERVER-77179: Update $queryStats parameters
and enterprise commits for
SERVER-76947 shapify $search and $backupCursorExtend
SERVER-76427: Rename $telemetry to $queryStats
SERVER-76531: Test that mongos does not collect telemetry for queryable encryption collections
SERVER-73152: Aggregation shapification for query stats
SERVER-77350: Update query stats sampling rate parameter name
SERVER-77190 Include the whole client metadata in telemetry key, not just appName
GitOrigin-RevId: 23ee70f6e72c9cf2fa79558fde10f6ecb42d9cf3
Branch: v7.0
https://github.com/mongodb/mongo/commit/30a74813261ead3652652c7afa50b0b6f243e15c

Comment by Githook User [ 31/May/23 ]

Author:

{'name': 'Maddie Zechar', 'email': 'maddie.zechar@mongodb.com', 'username': 'madelinezec'}

Message: SERVER-77190 Include the whole client metadata in telemetry key, not just appName
Branch: master
https://github.com/mongodb/mongo/commit/d355e3b5dc397d7fcec850269bcf969d8163fe83

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