SERVER-131792ClosedFixed

Fix initialization order problem with numCommandsTargetingSystemBuckets

The `numCommandsTargetingSystemBuckets` metric is initialized differently to most metrics. While most metrics are registered at file scope, this metric is initialized during the constructor of the SystemBucketsMetricsCommandHooks. That constructor runs when initializeCommandHooks() builds MongodCommandInvocationHooks which is called from _initAndListen(). This triggers [an invariant|https://github.com/mongodb/mongo/blob/be79e8062344f8290b81757c42403312b380630d/src/mongo/db/commands/server_sta

Affected Versions
Versions known to exhibit this issue
9.0.0-rc08.3.0
Fixed Versions
Versions that include the fix
9.1.0-rc09.0.0-rc28.3.16
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
bkp