{"_id":"@coralogix/instrumentation-mongodb","_rev":"6-7cc2ecc1420095f7c5c0663474edf43e","name":"@coralogix/instrumentation-mongodb","dist-tags":{"latest":"0.73.0"},"versions":{"0.61.0":{"name":"@coralogix/instrumentation-mongodb","version":"0.61.0","keywords":["mongodb","nodejs","opentelemetry","plugin","profiling","tracing"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@coralogix/instrumentation-mongodb@0.61.0","maintainers":[{"name":"coralogixnpm","email":"npm@coralogix.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-mongodb#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"dist":{"shasum":"f4c5fc4c6fd187028879ea1229f2e4bf113cf64f","tarball":"https://registry.npmjs.org/@coralogix/instrumentation-mongodb/-/instrumentation-mongodb-0.61.0.tgz","fileCount":3,"integrity":"sha512-YUJxlr1FQZuNT6y8WhxPy2CK0KEN6UglCG7JL8OGeVg39oxkBDbUhoE1SYvvd8Phk7kEGRiheu3L+2ODC0iLEA==","signatures":[{"sig":"MEQCIGoAFLTUV0L6H9wFHty9ers/KTnPSOicZIsBqRxN4M1OAiBJ9bv1QziAiq2uLOgJyeZi9BcGh48Atq+n8ub0afHrlw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19209},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":"^18.19.0 || >=20.6.0"},"gitHead":"b34b62b38f8a9e1439954dc1c2166437aabb863f","scripts":{"tdd":"npm run test-v5-v6-run -- --watch-extensions ts --watch","test":"npm run test-v5-v6 && npm run test-unit","clean":"rimraf build/*","watch":"tsc -w","compile":"tsc -p .","test-v3":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' 'test/**/mongodb-v3.test.ts'","test-v4":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' 'test/mongodb-v4-v5-v6.metrics.test.ts' 'test/**/mongodb-v4.test.ts'","test-unit":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' 'test/**/unit/*.test.ts'","test-v5-v6":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' 'test/mongodb-v4-v5-v6.metrics.test.ts' 'test/**/mongodb-v5-v6.test.ts'","lint:readme":"node ../../scripts/lint-readme.js","prepublishOnly":"npm run compile","version:update":"node ../../scripts/version-update.js","test-all-versions":"tav","test-services:stop":"cd ../.. && npm run test-services:stop mongodb","test-services:start":"cd ../.. && npm run test-services:start mongodb","test:with-services-env":"cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm test","compile:with-dependencies":"nx run-many -t compile -p @opentelemetry/instrumentation-mongodb","test-all-versions:with-services-env":"cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm run test-all-versions"},"_npmUser":{"name":"coralogixnpm","email":"npm@coralogix.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git","type":"git","directory":"packages/instrumentation-mongodb"},"_npmVersion":"10.8.2","description":"OpenTelemetry instrumentation for `mongodb` database client for MongoDB","directories":{},"_nodeVersion":"18.20.8","dependencies":{"@opentelemetry/instrumentation":"npm:@coralogix/instrumentation@^0.208.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mongodb":"6.19.0","@types/bson":"4.0.5","@opentelemetry/api":"^1.3.0","@opentelemetry/sdk-metrics":"^2.0.0","@opentelemetry/sdk-trace-base":"^2.0.0","@opentelemetry/sdk-trace-node":"^2.0.0","@opentelemetry/contrib-test-utils":"^0.55.0","@opentelemetry/context-async-hooks":"^2.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/instrumentation-mongodb_0.61.0_1769019830319_0.7540437161814364","host":"s3://npm-registry-packages-npm-production"}},"0.61.1":{"name":"@coralogix/instrumentation-mongodb","version":"0.61.1","keywords":["mongodb","nodejs","opentelemetry","plugin","profiling","tracing"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@coralogix/instrumentation-mongodb@0.61.1","maintainers":[{"name":"coralogixnpm","email":"npm@coralogix.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-mongodb#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"dist":{"shasum":"cac1b9c5fe6c9a4683178ea9d75c6b07b7235871","tarball":"https://registry.npmjs.org/@coralogix/instrumentation-mongodb/-/instrumentation-mongodb-0.61.1.tgz","fileCount":21,"integrity":"sha512-ohbdA1x5Fa5/GAWIJ5I1XIzPbYNe4s6VZXc7RWYA3txGw/vbCRQkiSpRY/bKCe0fYe/MkzR8MgV6w7tm2l4htA==","signatures":[{"sig":"MEUCIHlvKbZj2cJv3T8FHqRZJwWa9b/8PlYrsQT8LfF5aGvpAiEAz7w0/ntFw52Qflp+Xs+k0CP/fImXsfaxXKrn9a1nE8c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":146844},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":"^18.19.0 || >=20.6.0"},"gitHead":"3c61bdf9c30ecf4419d5c995c7f24ef9107c936f","scripts":{"tdd":"npm run test-v5-v6-run -- --watch-extensions ts --watch","test":"npm run test-v5-v6 && npm run test-unit","clean":"rimraf build/*","watch":"tsc -w","compile":"tsc -p .","test-v3":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' 'test/**/mongodb-v3.test.ts'","test-v4":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' 'test/mongodb-v4-v5-v6.metrics.test.ts' 'test/**/mongodb-v4.test.ts'","test-unit":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' 'test/**/unit/*.test.ts'","test-v5-v6":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' 'test/mongodb-v4-v5-v6.metrics.test.ts' 'test/**/mongodb-v5-v6.test.ts'","lint:readme":"node ../../scripts/lint-readme.js","prepublishOnly":"npm run compile","version:update":"node ../../scripts/version-update.js","test-all-versions":"tav","test-services:stop":"cd ../.. && npm run test-services:stop mongodb","test-services:start":"cd ../.. && npm run test-services:start mongodb","test:with-services-env":"cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm test","compile:with-dependencies":"nx run-many -t compile -p @opentelemetry/instrumentation-mongodb","test-all-versions:with-services-env":"cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm run test-all-versions"},"_npmUser":{"name":"coralogixnpm","email":"npm@coralogix.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git","type":"git","directory":"packages/instrumentation-mongodb"},"_npmVersion":"10.8.2","description":"OpenTelemetry instrumentation for `mongodb` database client for MongoDB","directories":{},"_nodeVersion":"20.19.6","dependencies":{"@opentelemetry/instrumentation":"npm:@coralogix/instrumentation@^0.208.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mongodb":"6.19.0","@types/bson":"4.0.5","@opentelemetry/api":"^1.3.0","@opentelemetry/sdk-metrics":"^2.0.0","@opentelemetry/sdk-trace-base":"^2.0.0","@opentelemetry/sdk-trace-node":"^2.0.0","@opentelemetry/contrib-test-utils":"^0.55.0","@opentelemetry/context-async-hooks":"^2.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/instrumentation-mongodb_0.61.1_1769088391037_0.16077354391546206","host":"s3://npm-registry-packages-npm-production"}},"0.66.0":{"name":"@coralogix/instrumentation-mongodb","version":"0.66.0","keywords":["mongodb","nodejs","opentelemetry","plugin","profiling","tracing"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@coralogix/instrumentation-mongodb@0.66.0","maintainers":[{"name":"coralogixnpm","email":"npm@coralogix.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-mongodb#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"dist":{"shasum":"4c9cc383954960d4d7807e4d0dcdd2820face9aa","tarball":"https://registry.npmjs.org/@coralogix/instrumentation-mongodb/-/instrumentation-mongodb-0.66.0.tgz","fileCount":21,"integrity":"sha512-f6QoUqCG+P+MUbXPGEgWcdG1FsUBp46yy16W4WOKxaDg4RTiXnIU5yU5HdhldDvsfofZ20NlNvCyHvchH1lgRw==","signatures":[{"sig":"MEYCIQCXt+YEcb8Fy2YGqqW5BNc8HF+Qk6VqaczOS+u30ucswAIhAMhS0s2e6Jmsx8+bbq4Uwfg1AL5QhEv4rP2R6n05lO5z","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":158347},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":"^18.19.0 || >=20.6.0"},"gitHead":"3a9691a699ddd06c3644eec70bf4b50cc4217ba3","scripts":{"test":"npm run test-v6 && npm run test-unit","clean":"rimraf build/*","watch":"tsc -w","compile":"tsc -p .","test-v3":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' test/mongodb-v3.test.ts","test-v4":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' test/mongodb-metrics-v4plus.test.ts test/mongodb-v4.test.ts","test-v5":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' test/mongodb-metrics-v4plus.test.ts test/mongodb-v5plus.test.ts","test-v6":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' test/mongodb-metrics-v4plus.test.ts test/mongodb-v5plus.test.ts","test-v7":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' test/mongodb-metrics-v4plus.test.ts test/mongodb-v5plus.test.ts","test-unit":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' test/unit/*.test.ts","lint:readme":"node ../../scripts/lint-readme.js","prepublishOnly":"npm run compile","version:update":"node ../../scripts/version-update.js","test-services:ls":"echo mongodb","test-all-versions":"tav","test-services:stop":"cd ../.. && npm run test-services:stop mongodb","test-services:start":"cd ../.. && npm run test-services:start mongodb","test:with-services-env":"cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm test","compile:with-dependencies":"nx run-many -t compile -p @opentelemetry/instrumentation-mongodb","test-all-versions:with-services-env":"cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm run test-all-versions"},"_npmUser":{"name":"coralogixnpm","email":"npm@coralogix.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git","type":"git","directory":"packages/instrumentation-mongodb"},"_npmVersion":"10.8.2","description":"OpenTelemetry instrumentation for `mongodb` database client for MongoDB","directories":{},"_nodeVersion":"20.20.0","dependencies":{"@opentelemetry/instrumentation":"npm:@coralogix/instrumentation@^0.213.0","@opentelemetry/semantic-conventions":"^1.33.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mongodb":"6.19.0","@types/bson":"4.0.5","@opentelemetry/api":"^1.3.0","@opentelemetry/sdk-metrics":"^2.0.0","@opentelemetry/sdk-trace-base":"^2.0.0","@opentelemetry/sdk-trace-node":"^2.0.0","@opentelemetry/contrib-test-utils":"^0.60.0","@opentelemetry/context-async-hooks":"^2.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/instrumentation-mongodb_0.66.0_1773311996566_0.7223997098564958","host":"s3://npm-registry-packages-npm-production"}},"0.73.0":{"name":"@coralogix/instrumentation-mongodb","version":"0.73.0","description":"OpenTelemetry instrumentation for `mongodb` database client for MongoDB","main":"build/src/index.js","types":"build/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/coralogix/opentelemetry-js-contrib.git","directory":"packages/instrumentation-mongodb"},"scripts":{"clean":"rimraf build/*","lint:readme":"node ../../scripts/lint-readme.js","version:update":"node ../../scripts/version-update.js","compile:with-dependencies":"nx run-many -t compile -p @opentelemetry/instrumentation-mongodb","compile":"tsc -p .","prepublishOnly":"npm run compile","test":"npm run test-v6 && npm run test-unit","test-unit":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' test/unit/*.test.ts","test-v3":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' test/mongodb-v3.test.ts","test-v4":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' test/mongodb-metrics-v4plus.test.ts test/mongodb-v4.test.ts","test-v5":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' test/mongodb-metrics-v4plus.test.ts test/mongodb-v5plus.test.ts","test-v6":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' test/mongodb-metrics-v4plus.test.ts test/mongodb-v5plus.test.ts","test-v7":"nyc --no-clean mocha --require '@opentelemetry/contrib-test-utils' test/mongodb-metrics-v4plus.test.ts test/mongodb-v5plus.test.ts","test:with-services-env":"cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm test","test-all-versions":"tav","test-all-versions:with-services-env":"cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm run test-all-versions","test-services:ls":"echo mongodb","test-services:start":"cd ../.. && npm run test-services:start mongodb","test-services:stop":"cd ../.. && npm run test-services:stop mongodb","watch":"tsc -w"},"keywords":["mongodb","nodejs","opentelemetry","plugin","profiling","tracing"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":"^18.19.0 || >=20.6.0"},"publishConfig":{"access":"public"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"devDependencies":{"@opentelemetry/api":"^1.3.0","@opentelemetry/context-async-hooks":"^2.0.0","@opentelemetry/contrib-test-utils":"^0.67.0","@opentelemetry/sdk-metrics":"^2.0.0","@opentelemetry/sdk-trace-base":"^2.0.0","@opentelemetry/sdk-trace-node":"^2.0.0","@types/bson":"4.0.5","mongodb":"6.19.0"},"dependencies":{"@opentelemetry/instrumentation":"npm:@coralogix/instrumentation@^0.220.0","@opentelemetry/semantic-conventions":"^1.33.0"},"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-mongodb#readme","gitHead":"0bba7e6f2845a99b751108ac423460014dc844f4","_id":"@coralogix/instrumentation-mongodb@0.73.0","bugs":{"url":"https://github.com/coralogix/opentelemetry-js-contrib/issues"},"_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-2CGaEgwbw32NTV2ZqhKmdr351K+5gKq41xn3xzXeKjGTcJhmByruO0fRswzFxvCHRfvIZU9Y3OxeRy1G3QPiZw==","shasum":"39f2b079d3e09934c70aa0c7da1859b35db80c10","tarball":"https://registry.npmjs.org/@coralogix/instrumentation-mongodb/-/instrumentation-mongodb-0.73.0.tgz","fileCount":21,"unpackedSize":151934,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@coralogix%2finstrumentation-mongodb@0.73.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCSix2B3V3aaICTXXRfz9FkL7pwjLuEHCM9ssLQ/3vtMwIhAOfKD5Oj0clKtGuglZ68onikVQcTZkmc2MmVqxL4c5Ud"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:17c992a2-ad89-497c-ab09-bf30c9f689a1"}},"directories":{},"maintainers":[{"name":"coralogixnpm","email":"npm@coralogix.com"},{"name":"ashley-hunter-cx","email":"ashley.hunter@coralogix.com"},{"name":"cx-shaharkazaz","email":"shahar.kazaz@coralogix.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/instrumentation-mongodb_0.73.0_1783100964148_0.16185859526404944"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-21T18:23:50.244Z","modified":"2026-07-03T17:49:24.644Z","0.61.0":"2026-01-21T18:23:50.455Z","0.61.1":"2026-01-22T13:26:31.178Z","0.66.0":"2026-03-12T10:39:56.738Z","0.73.0":"2026-07-03T17:49:24.290Z"},"bugs":{"url":"https://github.com/coralogix/opentelemetry-js-contrib/issues"},"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-mongodb#readme","keywords":["mongodb","nodejs","opentelemetry","plugin","profiling","tracing"],"repository":{"type":"git","url":"git+https://github.com/coralogix/opentelemetry-js-contrib.git","directory":"packages/instrumentation-mongodb"},"description":"OpenTelemetry instrumentation for `mongodb` database client for MongoDB","maintainers":[{"name":"coralogixnpm","email":"npm@coralogix.com"},{"name":"ashley-hunter-cx","email":"ashley.hunter@coralogix.com"},{"name":"cx-shaharkazaz","email":"shahar.kazaz@coralogix.com"}],"readme":"# OpenTelemetry MongoDB Instrumentation for Node.js\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\nThis module provides automatic instrumentation for the [`mongodb`](https://github.com/mongodb/node-mongodb-native) module, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle.\n\nIf total installation size is not constrained, it is recommended to use the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle with [@opentelemetry/sdk-node](`https://www.npmjs.com/package/@opentelemetry/sdk-node`) for the most seamless instrumentation experience.\n\nCompatible with OpenTelemetry JS API and SDK `1.0+`.\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/instrumentation-mongodb\n```\n\n### Supported Versions\n\n- [`mongodb`](https://www.npmjs.com/package/mongodb) version `>=3.3.0 <8`\n\n## Usage\n\nOpenTelemetry MongoDB Instrumentation allows the user to automatically collect trace data and export them to their backend of choice, to give observability to distributed systems.\n\nTo load a specific instrumentation (**mongodb** in this case), specify it in the Node Tracer's configuration.\n\n```javascript\nconst { MongoDBInstrumentation } = require('@opentelemetry/instrumentation-mongodb');\nconst { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');\nconst { registerInstrumentations } = require('@opentelemetry/instrumentation');\n\nconst provider = new NodeTracerProvider();\nprovider.register();\n\nregisterInstrumentations({\n  instrumentations: [\n    new MongoDBInstrumentation({\n      // see under for available configuration\n    }),\n  ],\n});\n\n```\n\nSee [`examples/mongodb`](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/examples/mongodb) for a short example.\n\n### Mongo instrumentation Options\n\nMongodb instrumentation has few options available to choose from. You can set the following:\n\n| Options                     | Type     | Description |\n| --------------------------- | -------- | ----------- |\n| `enhancedDatabaseReporting` | boolean  | If true, additional information about query parameters and results will be attached (as `attributes`) to spans representing database operations. |\n| `responseHook`              | function | Function for adding custom attributes from db response. See type `MongoDBInstrumentationExecutionResponseHook`. |\n| `dbStatementSerializer`     | function | Custom serializer function for the `db.statement` / `db.query.text` span attribute. See type `DbStatementSerializer`. |\n| `requireParentSpan`         | boolean  | Require a parent span in order to create mongodb spans, default when unset is `true`. |\n\n## Semantic Conventions\n\nThis instrumentation implements Semantic Conventions (semconv) v1.7.0. Since then, networking (in semconv v1.23.1) and database (in semconv v1.33.0) semantic conventions were stabilized. As of `@opentelemetry/instrumentation-mongodb@0.63.0` support has been added for migrating to the stable semantic conventions using the `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable as follows:\n\n1. Upgrade to the latest version of this instrumentation package.\n2. Set `OTEL_SEMCONV_STABILITY_OPT_IN=http/dup,database/dup` to emit both old and stable semantic conventions. (The `http` token is used to control the `net.*` attributes, the `database` token to control to `db.*` attributes.)\n3. Modify alerts, dashboards, metrics, and other processes in your Observability system to use the stable semantic conventions.\n4. Set `OTEL_SEMCONV_STABILITY_OPT_IN=http,database` to emit only the stable semantic conventions.\n\nBy default, if `OTEL_SEMCONV_STABILITY_OPT_IN` includes neither of the above tokens, the old v1.7.0 semconv is used.\nThe intent is to provide an approximate 6 month time window for users of this instrumentation to migrate to the new database and networking semconv, after which a new minor version will use the new semconv by default and drop support for the old semconv.\nSee [the HTTP migration guide](https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/) and the [database migration guide](https://opentelemetry.io/docs/specs/semconv/non-normative/db-migration/) for details.\n\nSpan attributes:\n\n| Old semconv             | Stable semconv       | Description |\n| ----------------------- | -------------------- | ----------- |\n| `db.system`             | `db.system.name`     | 'mongodb'   |\n| `db.name`               | `db.namespace`       | The MongoDB database name. |\n| `db.connection_string`  | Removed              |             |\n| `db.operation`          | `db.operation.name`  | The name of the MongoDB command being executed. |\n| `db.mongodb.collection` | `db.collection.name` | The MongoDB collection being accessed within the database stated in `db.namespace`. |\n| `db.statement`          | `db.query.text`      | The database query being executed. |\n| `net.peer.name`         | `server.address`     | Remote hostname or similar. |\n| `net.peer.port`         | `server.port`        | Remote port number. |\n\nMetrics collected:\n\n- [`db.client.connections.usage`](https://github.com/open-telemetry/semantic-conventions/blob/v1.24.0/docs/database/database-metrics.md#metric-dbclientconnectionsusage) - The number of connections currently in a given state.\n\n  Note: While `db.client.connections.usage` has been deprecated in favor of `db.client.connection.count` in the [semconv database migration](https://opentelemetry.io/docs/specs/semconv/non-normative/db-migration/#database-client-connection-count), the new metric is still unstable, so cannot be enabled via `OTEL_SEMCONV_STABILITY_OPT_IN=database`. There is ongoing work to provide an opt-in setting to select the latest experimental semconv.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-mongodb\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-mongodb.svg\n","readmeFilename":"README.md"}