File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -517,6 +517,34 @@ operation.
517
517
For more information on lock modes, see
518
518
:ref:`faq-concurrency-locking`.
519
519
520
+ .. data:: system.profile.authorization
521
+
522
+ .. versionadded:: 5.0.0
523
+
524
+ The number of times the user cache is accessed for each operation.
525
+ These metrics are only displayed when an operation has accessed the
526
+ user cache at least once.
527
+
528
+ These metrics are only available when :ref:`slow operation logging
529
+ <log-message-slow-ops>` or :ref:`database profiling <profiler>` is
530
+ enabled.
531
+
532
+ :data:`system.profile.authorization` is not included in
533
+ :method:`db.currentOp()` output.
534
+
535
+ .. data:: system.profile.authorization.startedUserCacheAcquisitionAttempts
536
+
537
+ The number of times the operation tried to access the user cache.
538
+
539
+ .. data:: system.profile.authorization.completedUserCacheAcquisitionAttempts
540
+
541
+ The number of times the operation retrieved user data from the
542
+ user cache.
543
+
544
+ .. data:: system.profile.authorization.userCacheWaitTimeMicros
545
+
546
+ The total time the operation spent waiting for user cache
547
+ responses.
520
548
521
549
.. data:: system.profile.storage
522
550
Original file line number Diff line number Diff line change @@ -1414,3 +1414,22 @@ The following example log message contains a ``resolvedViews`` field for
1414
1414
}
1415
1415
}
1416
1416
}
1417
+
1418
+ Authorization
1419
+ ~~~~~~~~~~~~~
1420
+
1421
+ Starting in MongoDB 5.0, :ref:`log messages for slow queries
1422
+ <log-message-slow-ops>` include a
1423
+ :data:`system.profile.authorization` section. These metrics help
1424
+ determine if a request is delayed because of contention for the user
1425
+ authorization cache.
1426
+
1427
+ .. code-block:: javascript
1428
+ :copyable: false
1429
+
1430
+ "authorization": {
1431
+ "startedUserCacheAcquisitionAttempts": 1,
1432
+ "completedUserCacheAcquisitionAttempts": 1,
1433
+ "userCacheWaitTimeMicros": 508
1434
+ },
1435
+
You can’t perform that action at this time.
0 commit comments