$currentOp

Reference type:Cheat sheetFormat:Syntax + example + use case

Reference group: Pipeline stages

What it does

Administrative stage exposing current operations in supported contexts.

Syntax

{$currentOp: { ... }}

Use case

Investigate active operations.

Important notes

Requires suitable privileges and deployment support.

$currentOp: practical example
{ $currentOp: { allUsers: true, idleConnections: false } }
💡 Explanation Administrative stage exposing current operations in supported contexts. When to use it Investigate active operations. Caution Requires suitable privileges and deployment support.
Key Takeaways
  • Administrative stage exposing current operations in supported contexts.
  • Typical use: Investigate active operations.