This package hooks into the MongoDB Node.js driver to automatically record query performance metrics as Datadog histograms. Current stable version is 0.1.2, last updated in 2014. It patches the driver's methods to measure execution time and emit stats to a StatsD client. No longer actively maintained; users are advised to consider alternatives like datadog-metrics or custom APM libraries for modern MongoDB drivers.
npm install mongodb-datadog-statsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Instruments the MongoDB driver to send query performance histograms to Datadog via StatsD.
Upgrade to a more recent instrumentation library like 'mongodb-instrumentor' or use Datadog APM.
Consider switching to 'datadog-metrics' or 'hot-shots' with manual instrumentation.
Call install() only once per process, passing a single statsClient.
Use callback-style or manually wrap with promisify if needed.
Install via `npm install mongodb-datadog-stats` and use `require()` (CommonJS).
Use `const mongoDogStats = require('mongodb-datadog-stats');` instead of `import`.Use mongodb driver version 2.x (e.g., `npm install mongodb@2`).