@opentelemetry/instrumentation-grpc
Advanced tools
Comparing version 0.16.1-alpha.18 to 0.16.1-alpha.20
@@ -36,3 +36,3 @@ "use strict"; | ||
new instrumentation_1.InstrumentationNodeModuleDefinition('@grpc/grpc-js', ['1.*'], (moduleExports, version) => { | ||
this._logger.debug(`Applying patch for @grpc/grpc-js@${version}`); | ||
api_1.diag.debug(`Applying patch for @grpc/grpc-js@${version}`); | ||
if (instrumentation_1.isWrapped(moduleExports.Server.prototype.register)) { | ||
@@ -60,3 +60,3 @@ this._unwrap(moduleExports.Server.prototype, 'register'); | ||
return; | ||
this._logger.debug(`Removing patch for @grpc/grpc-js@${version}`); | ||
api_1.diag.debug(`Removing patch for @grpc/grpc-js@${version}`); | ||
this._unwrap(moduleExports.Server.prototype, 'register'); | ||
@@ -77,3 +77,3 @@ this._unwrap(moduleExports, 'makeClientConstructor'); | ||
const config = this._config; | ||
instrumentation._logger.debug('patched gRPC server'); | ||
api_1.diag.debug('patched gRPC server'); | ||
return function register(name, handler, serialize, deserialize, type) { | ||
@@ -92,3 +92,3 @@ const originalRegisterResult = originalRegister.call(this, name, handler, serialize, deserialize, type); | ||
}; | ||
instrumentation._logger.debug('patch func: %s', JSON.stringify(spanOptions)); | ||
api_1.diag.debug('patch func: %s', JSON.stringify(spanOptions)); | ||
api_1.context.with(api_1.propagation.extract(api_1.ROOT_CONTEXT, call.metadata, { | ||
@@ -120,3 +120,3 @@ get: (carrier, key) => carrier.get(key).map(String), | ||
return (original) => { | ||
instrumentation._logger.debug('patching client'); | ||
api_1.diag.debug('patching client'); | ||
return function makeClientConstructor(methods, serviceName, options) { | ||
@@ -135,3 +135,3 @@ const client = original.call(this, methods, serviceName, options); | ||
const instrumentation = this; | ||
instrumentation._logger.debug('patching loadPackageDefinition'); | ||
api_1.diag.debug('patching loadPackageDefinition'); | ||
return (original) => { | ||
@@ -151,3 +151,3 @@ return function patchedLoadPackageDefinition(packageDef) { | ||
return (original) => { | ||
instrumentation._logger.debug('patch all client methods'); | ||
api_1.diag.debug('patch all client methods'); | ||
return function clientMethodTrace() { | ||
@@ -154,0 +154,0 @@ const name = `grpc.${original.path.replace('/', '')}`; |
@@ -41,3 +41,3 @@ "use strict"; | ||
new instrumentation_1.InstrumentationNodeModuleDefinition('grpc', ['1.*'], (moduleExports, version) => { | ||
this._logger.debug(`Applying patch for grpc@${version}`); | ||
api_1.diag.debug(`Applying patch for grpc@${version}`); | ||
if (instrumentation_1.isWrapped(moduleExports.Server.prototype.register)) { | ||
@@ -57,3 +57,3 @@ this._unwrap(moduleExports.Server.prototype, 'register'); | ||
return; | ||
this._logger.debug(`Removing patch for grpc@${version}`); | ||
api_1.diag.debug(`Removing patch for grpc@${version}`); | ||
this._unwrap(moduleExports.Server.prototype, 'register'); | ||
@@ -65,3 +65,3 @@ }, this._getInternalPatchs()), | ||
const onPatch = (moduleExports, version) => { | ||
this._logger.debug(`Applying internal patch for grpc@${version}`); | ||
api_1.diag.debug(`Applying internal patch for grpc@${version}`); | ||
if (instrumentation_1.isWrapped(moduleExports.makeClientConstructor)) { | ||
@@ -76,3 +76,3 @@ this._unwrap(moduleExports, 'makeClientConstructor'); | ||
return; | ||
this._logger.debug(`Removing internal patch for grpc@${version}`); | ||
api_1.diag.debug(`Removing internal patch for grpc@${version}`); | ||
this._unwrap(moduleExports, 'makeClientConstructor'); | ||
@@ -88,3 +88,3 @@ }; | ||
return (originalRegister) => { | ||
instrumentation._logger.debug('patched gRPC server'); | ||
api_1.diag.debug('patched gRPC server'); | ||
return function register(name, handler, serialize, deserialize, type) { | ||
@@ -112,3 +112,3 @@ const originalResult = originalRegister.apply(this, arguments); | ||
}; | ||
instrumentation._logger.debug('patch func: %s', JSON.stringify(spanOptions)); | ||
api_1.diag.debug('patch func: %s', JSON.stringify(spanOptions)); | ||
api_1.context.with(api_1.propagation.extract(api_1.context.active(), call.metadata, { | ||
@@ -145,3 +145,3 @@ get: (metadata, key) => metadata.get(key).map(String), | ||
return (original) => { | ||
instrumentation._logger.debug('patching client'); | ||
api_1.diag.debug('patching client'); | ||
return function makeClientConstructor(methods, _serviceName, _options) { | ||
@@ -175,3 +175,3 @@ const client = original.apply(this, arguments); | ||
return (original) => { | ||
instrumentation._logger.debug('patch all client methods'); | ||
api_1.diag.debug('patch all client methods'); | ||
return function clientMethodTrace() { | ||
@@ -178,0 +178,0 @@ const name = `grpc.${original.path.replace('/', '')}`; |
{ | ||
"name": "@opentelemetry/instrumentation-grpc", | ||
"version": "0.16.1-alpha.18+9f965b0c", | ||
"version": "0.16.1-alpha.20+62f8695d", | ||
"description": "OpenTelemetry grpc automatic instrumentation package.", | ||
@@ -48,5 +48,5 @@ "main": "build/src/index.js", | ||
"@opentelemetry/context-base": "^0.16.0", | ||
"@opentelemetry/core": "^0.16.1-alpha.18+9f965b0c", | ||
"@opentelemetry/node": "^0.16.1-alpha.18+9f965b0c", | ||
"@opentelemetry/tracing": "^0.16.1-alpha.18+9f965b0c", | ||
"@opentelemetry/core": "^0.16.1-alpha.20+62f8695d", | ||
"@opentelemetry/node": "^0.16.1-alpha.20+62f8695d", | ||
"@opentelemetry/tracing": "^0.16.1-alpha.20+62f8695d", | ||
"@types/mocha": "8.2.0", | ||
@@ -71,8 +71,8 @@ "@types/node": "14.14.20", | ||
"dependencies": { | ||
"@opentelemetry/api": "^0.16.0", | ||
"@opentelemetry/api-metrics": "^0.16.0", | ||
"@opentelemetry/instrumentation": "^0.16.0", | ||
"@opentelemetry/api": "^0.16.1-alpha.20+62f8695d", | ||
"@opentelemetry/api-metrics": "^0.16.1-alpha.20+62f8695d", | ||
"@opentelemetry/instrumentation": "^0.16.1-alpha.20+62f8695d", | ||
"@opentelemetry/semantic-conventions": "^0.16.0" | ||
}, | ||
"gitHead": "9f965b0c749108df00bbe44eeab84d79b04bb0a4" | ||
"gitHead": "62f8695d3fe5309c62418a1043bc6e8a176bc11f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
110231
+ Added@opentelemetry/api@0.16.1-alpha.20(transitive)
+ Added@opentelemetry/api-metrics@0.16.1-alpha.20(transitive)
+ Added@opentelemetry/instrumentation@0.16.1-alpha.20(transitive)
- Removed@opentelemetry/api@0.16.0(transitive)
- Removed@opentelemetry/api-metrics@0.16.0(transitive)
- Removed@opentelemetry/instrumentation@0.16.0(transitive)
Updated@opentelemetry/instrumentation@^0.16.1-alpha.20+62f8695d