@@ -4870,6 +4870,11 @@ metrics
48704870.. code-block:: javascript
48714871
48724872 "metrics" : {
4873+ "apiVersions": {
4874+ "<appName1>": <string>,
4875+ "<appName2>": <string>,
4876+ "<appName3>": <string>
4877+ },
48734878 "aggStageCounters" : {
48744879 "<aggregation stage>" : NumberLong(<num>)
48754880 },
@@ -5046,6 +5051,36 @@ metrics
50465051
50475052 *New in version 4.4 (4.2.6 and 4.0.19).*
50485053
5054+ .. _server-status-apiVersions:
5055+
5056+ .. serverstatus:: metrics.apiVersions
5057+
5058+ A document with client applications and the version of Stable
5059+ API which they are configured with. Consider the following when
5060+ viewing ``metrics.apiVersions``:
5061+
5062+ - The only possible returned values for each ``appname`` are
5063+ ``default`` or ``1``.
5064+
5065+ - API version metrics are retained for 24 hours. If
5066+ no commands are issued with a specific API version from an
5067+ application in the past 24 hours, that ``appname`` and API version
5068+ will be removed from the metrics. This also applies to the
5069+ ``default`` API version metric.
5070+
5071+ - Set the ``appname`` when connecting to a MongoDB instance by
5072+ specifying the ``appname`` in the connection URI. ``?appName=ZZZ``
5073+ sets the ``appname`` to ``ZZZZ``.
5074+
5075+ - Drivers accessing the Stable API can set a default ``appname``.
5076+
5077+ - If no ``appname`` is configured, a default value will be
5078+ automatically populated based on the product. For example, for a
5079+ :compass:`MongoDB Compass </>` connection with no ``appname`` in
5080+ the URI, the metric returns: ``'MongoDB Compass': [ 'default' ]``.
5081+
5082+ *New in version 5.0.*
5083+
50495084.. serverstatus:: metrics.operatorCounters
50505085
50515086 A document with a number that indicates how often
0 commit comments