@@ -4878,6 +4878,11 @@ metrics
48784878.. code-block:: javascript
48794879
48804880 "metrics" : {
4881+ "apiVersions": {
4882+ "<appName1>": <string>,
4883+ "<appName2>": <string>,
4884+ "<appName3>": <string>
4885+ },
48814886 "aggStageCounters" : {
48824887 "<aggregation stage>" : NumberLong(<num>)
48834888 },
@@ -5054,6 +5059,36 @@ metrics
50545059
50555060 *New in version 4.4 (4.2.6 and 4.0.19).*
50565061
5062+ .. _server-status-apiVersions:
5063+
5064+ .. serverstatus:: metrics.apiVersions
5065+
5066+ A document with client applications and the version of Stable
5067+ API which they are configured with. Consider the following when
5068+ viewing ``metrics.apiVersions``:
5069+
5070+ - The only possible returned values for each ``appname`` are
5071+ ``default`` or ``1``.
5072+
5073+ - API version metrics are retained for 24 hours. If
5074+ no commands are issued with a specific API version from an
5075+ application in the past 24 hours, that ``appname`` and API version
5076+ will be removed from the metrics. This also applies to the
5077+ ``default`` API version metric.
5078+
5079+ - Set the ``appname`` when connecting to a MongoDB instance by
5080+ specifying the ``appname`` in the connection URI. ``?appName=ZZZ``
5081+ sets the ``appname`` to ``ZZZZ``.
5082+
5083+ - Drivers accessing the Stable API can set a default ``appname``.
5084+
5085+ - If no ``appname`` is configured, a default value will be
5086+ automatically populated based on the product. For example, for a
5087+ :compass:`MongoDB Compass </>` connection with no ``appname`` in
5088+ the URI, the metric returns: ``'MongoDB Compass': [ 'default' ]``.
5089+
5090+ *New in version 5.0.*
5091+
50575092.. serverstatus:: metrics.operatorCounters
50585093
50595094 A document with a number that indicates how often
0 commit comments