Skip to content
TrueBridging

MongoDBMongoDB performance monitoring & query optimization

MongoDB monitoring built for real replica sets and sharded clusters

TrueBridging watches query shapes, replication lag, and connection load across your MongoDB deployment, and turns collection scans into indexed, verified fixes.

MongoDBWarning
Fix ready for review

Collection scan on sessions (user_id, last_active)

Query shape · plannerCOLLSCAN
db.sessions.find({ user_id }).sort({ last_active: -1 })
Share of total database loadrising
Proposed fixMissing compound index
mongosh · MongoDB
db.sessions.createIndex(
  { user_id: 1, last_active: -1 },
  { background: true }
);
Expected impact · COLLSCAN → IXSCANRisk: Low – builds in background

Why MongoDB needs purpose-built monitoring

Schema-flexible doesn't mean scan-proof

MongoDB's flexible schema is a feature for developers and a trap for performance. A query shape that worked fine against a small collection can quietly become a full collection scan as documents accumulate, because there was never a schema migration step to force an index conversation. Add replica sets, sharding, and connection pooling on top, and the failure modes multiply: replication lag that silently serves stale reads, an oplog window too short for a delayed secondary to catch back up, or a connection pool that saturates under a traffic spike.

TrueBridging monitors MongoDB the way it's actually run in production — as a replicated, often sharded system where the biggest risks are invisible until a query shape or a topology change tips things over.

What TrueBridging watches

Signals across query shape, topology, and resource pressure

Query shape analysis

Detects COLLSCAN-driven queries from real production traffic and groups them by shape to prioritize the highest-impact index opportunities.

Replication & oplog health

Tracks replication lag per secondary and oplog window size, flagging configurations at risk of a secondary falling out of sync.

Connection & pool saturation

Monitors active connections against configured limits, per-driver pool sizing, and connection churn patterns.

Working set & memory pressure

Estimates working set size against available RAM and flags collections at risk of page-cache eviction thrashing.

Sharding & chunk balance

Surfaces uneven chunk distribution and jumbo chunks that concentrate load on a single shard.

Slow operation logs

Aggregates slow operations by shape and origin service, so you know which application code path to fix, not just which query.

Example

From unbounded query to an indexed, verified fix

A sessions collection query filtering on user_id and sorting by last_active has no supporting compound index, forcing a collection scan on every call. TrueBridging flags the shape as responsible for a growing share of total database load and proposes:

Once approved, TrueBridging builds the index in the background, confirms the query planner is now selecting an IXSCAN instead of a COLLSCAN, and verifies the improvement in observed p95 latency before closing the issue.

proposed_fix.js · mongosh
db.sessions.createIndex(
  { user_id: 1, last_active: -1 },
  { background: true }
);
BeforeCOLLSCANEvery call scans the sessions collection
After · verifiedIXSCANPlanner selects the compound index · p95 re-measured

FAQ

MongoDB monitoring questions

Does TrueBridging need the MongoDB profiler enabled?

TrueBridging can work with the database profiler enabled at a sampled level, or rely on serverStatus, currentOp, and slow-query log entries where the profiler is kept off in performance-sensitive production clusters.

Can TrueBridging monitor sharded clusters and replica sets?

Yes. TrueBridging monitors replica set member health, oplog window, and replication lag, as well as per-shard load distribution and chunk balance in sharded clusters.

Does TrueBridging recommend indexes for MongoDB collections?

Yes. TrueBridging identifies collection scans (COLLSCAN) driven by real production query shapes and proposes the specific compound index that would convert them into index scans.

Is TrueBridging compatible with MongoDB Atlas?

Yes. TrueBridging connects to self-hosted MongoDB as well as MongoDB Atlas clusters using a read-only database user.

Find the collection scans costing you latency