Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opentelemetry/instrumentation-mongodb

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/instrumentation-mongodb - npm Package Compare versions

Comparing version 0.33.0 to 0.34.0

22

build/src/instrumentation.js

@@ -133,3 +133,3 @@ "use strict";

// eslint-disable-next-line @typescript-eslint/no-explicit-any
ops[0]);
ops[0], operationName);
const patchedCallback = instrumentation._patchEnd(span, resultHandler);

@@ -168,3 +168,4 @@ // handle when options is the callback to send the correct number of args

});
instrumentation._populateV3Attributes(span, ns, server, cmd);
const operation = commandType === internal_types_1.MongodbCommandType.UNKNOWN ? undefined : commandType;
instrumentation._populateV3Attributes(span, ns, server, cmd, operation);
const patchedCallback = instrumentation._patchEnd(span, resultHandler);

@@ -199,3 +200,3 @@ // handle when options is the callback to send the correct number of args

});
instrumentation._populateV4Attributes(span, this, ns, cmd);
instrumentation._populateV4Attributes(span, this, ns, cmd, commandType);
const patchedCallback = instrumentation._patchEnd(span, resultHandler);

@@ -226,3 +227,3 @@ return original.call(this, ns, cmd, options, patchedCallback);

});
instrumentation._populateV3Attributes(span, ns, server, cmd);
instrumentation._populateV3Attributes(span, ns, server, cmd, 'find');
const patchedCallback = instrumentation._patchEnd(span, resultHandler);

@@ -257,3 +258,3 @@ // handle when options is the callback to send the correct number of args

});
instrumentation._populateV3Attributes(span, ns, server, cursorState.cmd);
instrumentation._populateV3Attributes(span, ns, server, cursorState.cmd, 'getMore');
const patchedCallback = instrumentation._patchEnd(span, resultHandler);

@@ -298,3 +299,3 @@ // handle when options is the callback to send the correct number of args

*/
_populateV4Attributes(span, connectionCtx, ns, command) {
_populateV4Attributes(span, connectionCtx, ns, command, operation) {
let host, port;

@@ -321,3 +322,3 @@ if (connectionCtx) {

}
this._addAllSpanAttributes(span, ns.db, ns.collection, host, port, commandObj);
this._addAllSpanAttributes(span, ns.db, ns.collection, host, port, commandObj, operation);
}

@@ -331,3 +332,3 @@ /**

*/
_populateV3Attributes(span, ns, topology, command) {
_populateV3Attributes(span, ns, topology, command, operation) {
var _a, _b, _c, _d, _e, _f, _g, _h;

@@ -356,5 +357,5 @@ // add network attributes to determine the remote server

const commandObj = (_h = (_g = command === null || command === void 0 ? void 0 : command.query) !== null && _g !== void 0 ? _g : command === null || command === void 0 ? void 0 : command.q) !== null && _h !== void 0 ? _h : command;
this._addAllSpanAttributes(span, dbName, dbCollection, host, port, commandObj);
this._addAllSpanAttributes(span, dbName, dbCollection, host, port, commandObj, operation);
}
_addAllSpanAttributes(span, dbName, dbCollection, host, port, commandObj) {
_addAllSpanAttributes(span, dbName, dbCollection, host, port, commandObj, operation) {
// add database related attributes

@@ -365,2 +366,3 @@ span.setAttributes({

[semantic_conventions_1.SemanticAttributes.DB_MONGODB_COLLECTION]: dbCollection,
[semantic_conventions_1.SemanticAttributes.DB_OPERATION]: operation,
});

@@ -367,0 +369,0 @@ if (host && port) {

@@ -1,2 +0,2 @@

export declare const VERSION = "0.33.0";
export declare const VERSION = "0.34.0";
//# sourceMappingURL=version.d.ts.map

@@ -20,3 +20,3 @@ "use strict";

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.33.0';
exports.VERSION = '0.34.0';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/instrumentation-mongodb",
"version": "0.33.0",
"version": "0.34.0",
"description": "OpenTelemetry mongodb automatic instrumentation package.",

@@ -75,3 +75,3 @@ "main": "build/src/index.js",

"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-mongodb#readme",
"gitHead": "59fa57cfd0dff4ae0e6f3833dff73c55dfd79ee5"
"gitHead": "8472e8273d14993a13f921b6f8173b20fb37a383"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc