@@ -4878,6 +4878,11 @@ metrics
4878
4878
.. code-block:: javascript
4879
4879
4880
4880
"metrics" : {
4881
+ "apiVersions": {
4882
+ "<appName1>": <string>,
4883
+ "<appName2>": <string>,
4884
+ "<appName3>": <string>
4885
+ },
4881
4886
"aggStageCounters" : {
4882
4887
"<aggregation stage>" : NumberLong(<num>)
4883
4888
},
@@ -5054,6 +5059,36 @@ metrics
5054
5059
5055
5060
*New in version 4.4 (4.2.6 and 4.0.19).*
5056
5061
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
+
5057
5092
.. serverstatus:: metrics.operatorCounters
5058
5093
5059
5094
A document with a number that indicates how often
0 commit comments