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 @@ -519,6 +519,34 @@ operation.
519
519
For more information on lock modes, see
520
520
:ref:`faq-concurrency-locking`.
521
521
522
+ .. data:: system.profile.authorization
523
+
524
+ .. versionadded:: 5.0.0
525
+
526
+ The number of times the user cache is accessed for each operation.
527
+ These metrics are only displayed when an operation has accessed the
528
+ user cache at least once.
529
+
530
+ These metrics are only available when :ref:`slow operation logging
531
+ <log-message-slow-ops>` or :ref:`database profiling <profiler>` is
532
+ enabled.
533
+
534
+ :data:`system.profile.authorization` is not included in
535
+ :method:`db.currentOp()` output.
536
+
537
+ .. data:: system.profile.authorization.startedUserCacheAcquisitionAttempts
538
+
539
+ The number of times the operation tried to access the user cache.
540
+
541
+ .. data:: system.profile.authorization.completedUserCacheAcquisitionAttempts
542
+
543
+ The number of times the operation retrieved user data from the
544
+ user cache.
545
+
546
+ .. data:: system.profile.authorization.userCacheWaitTimeMicros
547
+
548
+ The total time the operation spent waiting for user cache
549
+ responses.
522
550
523
551
.. data:: system.profile.storage
524
552
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