mongosh exposes two methods:
They map to the corresponding server commands (DOCSP-31017).
SERVER-78406 and SERVER-78265 introduced several command options to he analyzeShardKey command. So the shell helper added in MONGOSH-1442 should be updated to support the new options. Please see the IDL struct for the command for more details.
MONGOSH-1442Add and expose metrics to make shard key selection easier
SERVER-78265Make analyzeShardKey command support sampling documents
SERVER-78406Rename the 'sampleRate' option for configureQueryAnalyzer command to 'samplesPerSecond'