@opentelemetry/plugin-grpc
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -38,2 +38,3 @@ /*! | ||
private _patchClient; | ||
private _getMethodsToWrap; | ||
private _getPatchedClientMethods; | ||
@@ -40,0 +41,0 @@ /** |
@@ -187,3 +187,3 @@ "use strict"; | ||
const client = original.apply(this, arguments); | ||
shimmer.massWrap(client.prototype, Object.keys(methods), | ||
shimmer.massWrap(client.prototype, plugin._getMethodsToWrap(client, methods), | ||
// tslint:disable-next-line:no-any | ||
@@ -195,2 +195,11 @@ plugin._getPatchedClientMethods()); | ||
} | ||
_getMethodsToWrap(client, methods) { | ||
const methodsToWrap = [ | ||
...Object.keys(methods), | ||
...Object.keys(methods) | ||
.map(methodName => methods[methodName].originalName) | ||
.filter(originalName => !!originalName && client.prototype.hasOwnProperty(originalName)), | ||
]; | ||
return methodsToWrap; | ||
} | ||
_getPatchedClientMethods() { | ||
@@ -197,0 +206,0 @@ const plugin = this; |
{ | ||
"name": "@opentelemetry/plugin-grpc", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "OpenTelemetry grpc automatic instrumentation package.", | ||
@@ -43,4 +43,4 @@ "main": "build/src/index.js", | ||
"devDependencies": { | ||
"@opentelemetry/node": "^0.3.0", | ||
"@opentelemetry/tracing": "^0.3.0", | ||
"@opentelemetry/node": "^0.3.1", | ||
"@opentelemetry/tracing": "^0.3.1", | ||
"@types/mocha": "^5.2.7", | ||
@@ -66,6 +66,6 @@ "@types/node": "^12.6.9", | ||
"dependencies": { | ||
"@opentelemetry/core": "^0.3.0", | ||
"@opentelemetry/types": "^0.3.0", | ||
"@opentelemetry/core": "^0.3.1", | ||
"@opentelemetry/types": "^0.3.1", | ||
"shimmer": "^1.2.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42286
621
Updated@opentelemetry/core@^0.3.1
Updated@opentelemetry/types@^0.3.1