@@ -4870,6 +4870,11 @@ metrics
4870
4870
.. code-block:: javascript
4871
4871
4872
4872
"metrics" : {
4873
+ "apiVersions": {
4874
+ "<appName1>": <string>,
4875
+ "<appName2>": <string>,
4876
+ "<appName3>": <string>
4877
+ },
4873
4878
"aggStageCounters" : {
4874
4879
"<aggregation stage>" : NumberLong(<num>)
4875
4880
},
@@ -5046,6 +5051,36 @@ metrics
5046
5051
5047
5052
*New in version 4.4 (4.2.6 and 4.0.19).*
5048
5053
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
+
5049
5084
.. serverstatus:: metrics.operatorCounters
5050
5085
5051
5086
A document with a number that indicates how often
0 commit comments