@opentelemetry/plugin-grpc
Advanced tools
Comparing version 0.11.1-alpha.48 to 0.11.1-alpha.53
@@ -126,4 +126,3 @@ "use strict"; | ||
const parsedName = name.split('/'); | ||
return (utils_1._containsOtelMetadata(call.metadata) || | ||
utils_1._methodIsIgnored(parsedName[parsedName.length - 1] || name, this._config.ignoreGrpcMethods)); | ||
return utils_1._methodIsIgnored(parsedName[parsedName.length - 1] || name, this._config.ignoreGrpcMethods); | ||
} | ||
@@ -226,5 +225,2 @@ _clientStreamAndUnaryHandler(plugin, span, call, callback, original, self) { | ||
const metadata = plugin._getMetadata(original, args); | ||
if (utils_1._containsOtelMetadata(metadata)) { | ||
return original.apply(this, args); | ||
} | ||
const span = plugin._tracer.startSpan(name, { | ||
@@ -231,0 +227,0 @@ kind: api_1.SpanKind.CLIENT, |
@@ -12,7 +12,2 @@ import { CanonicalCode, Status } from '@opentelemetry/api'; | ||
/** | ||
* Returns true if the metadata contains | ||
* the opentelemetry outgoing request header. | ||
*/ | ||
export declare const _containsOtelMetadata: (metadata: grpcTypes.Metadata) => boolean; | ||
/** | ||
* Returns true if the current plugin configuration | ||
@@ -19,0 +14,0 @@ * ignores the given method. |
@@ -18,8 +18,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._methodIsIgnored = exports._containsOtelMetadata = exports._grpcStatusCodeToSpanStatus = exports._grpcStatusCodeToCanonicalCode = exports.findIndex = void 0; | ||
exports._methodIsIgnored = exports._grpcStatusCodeToSpanStatus = exports._grpcStatusCodeToCanonicalCode = exports.findIndex = void 0; | ||
const api_1 = require("@opentelemetry/api"); | ||
/** | ||
* Metadata key used to denote an outgoing opentelemetry request. | ||
*/ | ||
const _otRequestHeader = 'x-opentelemetry-outgoing-request'; | ||
// Equivalent to lodash _.findIndex | ||
@@ -50,9 +46,2 @@ exports.findIndex = (args, fn) => { | ||
/** | ||
* Returns true if the metadata contains | ||
* the opentelemetry outgoing request header. | ||
*/ | ||
exports._containsOtelMetadata = (metadata) => { | ||
return metadata.get(_otRequestHeader).length > 0; | ||
}; | ||
/** | ||
* Returns true if methodName matches pattern | ||
@@ -59,0 +48,0 @@ * @param methodName the name of the method |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.11.1-alpha.48+15174c6"; | ||
export declare const VERSION = "0.11.1-alpha.53+00a8ce7f"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.11.1-alpha.48+15174c6'; | ||
exports.VERSION = '0.11.1-alpha.53+00a8ce7f'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/plugin-grpc", | ||
"version": "0.11.1-alpha.48+15174c6", | ||
"version": "0.11.1-alpha.53+00a8ce7f", | ||
"description": "OpenTelemetry grpc automatic instrumentation package.", | ||
@@ -45,7 +45,7 @@ "main": "build/src/index.js", | ||
"devDependencies": { | ||
"@opentelemetry/context-async-hooks": "^0.11.1-alpha.48+15174c6", | ||
"@opentelemetry/context-base": "^0.11.1-alpha.48+15174c6", | ||
"@opentelemetry/context-async-hooks": "^0.11.0", | ||
"@opentelemetry/context-base": "^0.11.0", | ||
"@opentelemetry/grpc-utils": "^0.11.0", | ||
"@opentelemetry/node": "^0.11.1-alpha.48+15174c6", | ||
"@opentelemetry/tracing": "^0.11.1-alpha.48+15174c6", | ||
"@opentelemetry/node": "^0.11.1-alpha.53+00a8ce7f", | ||
"@opentelemetry/tracing": "^0.11.1-alpha.53+00a8ce7f", | ||
"@types/mocha": "8.0.2", | ||
@@ -66,12 +66,12 @@ "@types/node": "14.0.27", | ||
"ts-mocha": "7.0.0", | ||
"ts-node": "8.10.2", | ||
"ts-node": "9.0.0", | ||
"typescript": "3.9.7" | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/api": "^0.11.1-alpha.48+15174c6", | ||
"@opentelemetry/core": "^0.11.1-alpha.48+15174c6", | ||
"@opentelemetry/semantic-conventions": "^0.11.1-alpha.48+15174c6", | ||
"@opentelemetry/api": "^0.11.1-alpha.53+00a8ce7f", | ||
"@opentelemetry/core": "^0.11.1-alpha.53+00a8ce7f", | ||
"@opentelemetry/semantic-conventions": "^0.11.0", | ||
"shimmer": "^1.2.1" | ||
}, | ||
"gitHead": "15174c6647ab9863dfc1424412fa60f2fddb3351" | ||
"gitHead": "00a8ce7f982ea24bcd4bc398477112894078ab29" | ||
} |
Sorry, the diff of this file is not supported yet
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
56216
598
+ Added@opentelemetry/semantic-conventions@0.11.0(transitive)
- Removed@opentelemetry/semantic-conventions@0.11.1-alpha.48(transitive)