Explain profiling for teams who run multiple services
TraceMole correlates query explain plans across Next.js, Node, and Python to catch slow COLLSCANs before MongoDB warning emails reach your inbox.
Open Source SDK
Auditable OpenTelemetry wrappers for Next.js, Node, and Python. See exactly what telemetry leaves your stack.
Query Origin Tracing
Pinpoint the exact microservice and filename line number causing a COLLSCAN database degradation.
Slack & Discord Webhooks
Instant alerts with index suggestions pushed to your communication channels when scan ratios exceed 1,000.
100% transparent telemetry built on OpenTelemetry
Audit every query telemetry attribute before it ships. We use open-source wrappers built directly on top of standard OpenTelemetry client APIs to ensure performance profiles are fully transparent and auditable.
// @tracemole/nextjs-mongodb-explain
// Audit the SDK. See exactly what leaves your servers.
import { withTraceMole } from "@tracemole/nextjs-mongodb-explain";
export default withTraceMole({
instrumentations: [
new MongoDBInstrumentation({
// We only extract explain metrics and query structures
// Your raw data payloads never leave your database
captureAttributes: ["db.mongodb.query.explain"]
})
]
});Catch COLLSCANs and 1000+ Scan-to-Return ratios
Identify unindexed tables and high scan rates in real time. We profile incoming queries and cross-reference them with database statistics to flag COLLSCAN pipelines before they degrade customer APIs.
Trace queries from all services using your database
Monitor query performance across your entire stack. TraceMole aggregates explain plan telemetry from Next.js APIs, Python background workers, and any other services querying your database, so you know exactly who runs unindexed COLLSCANs.
// Query origin traces mapped across all your services
[Trace ID: 89a3f2b8] ── Next.js API (Gateway) -> Status: 200 (242ms)
└─ [Span: db_query] MongoDB find() on "users" -> IXSCAN (3ms)
[Trace ID: 74f109ae] ── Python background-worker (Job) -> Status: Active
└─ [Span: db_query] MongoDB aggregate() on "orders" -> COLLSCAN (482ms)
⚠ ALERT: Scan/Returned Ratio is 1,240,954 : 14 (Critical)
⚠ SOURCE: python-ingest-service/tasks.py:L142Proactive alerting before database latency cascades
Stay notified as performance anomalies emerge. Setup Discord and Slack webhooks to push formatted alerts with the exact compound index setup statements needed to fix issues immediately.
Three steps to optimized indexing
Install Open Source SDK
Install SDKs built on OpenTelemetry. Auditable source code ensures you know exactly what database attributes leave your application.
Correlate explain metrics
TraceMole automatically checks the explain patterns of incoming requests. It monitors the scan/return ratios across all client drivers.
Receive instant webhooks
Receive Slack or Discord notifications with the exact query string and suggested compound index creation code as soon as a scan ratio exceeds 1000.