@opentelemetry/plugin-grpc
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -32,3 +32,3 @@ "use strict"; | ||
this.version = version; | ||
this.supportedVersions = ['^1.23.3']; | ||
this.supportedVersions = ['1.*']; | ||
this._internalFilesList = { | ||
@@ -49,5 +49,3 @@ '0.13 - 1.6': { client: 'src/node/src/client.js' }, | ||
// Wrap the externally exported client constructor | ||
if (this._moduleExports.makeGenericClientConstructor) { | ||
shimmer.wrap(this._moduleExports, 'makeGenericClientConstructor', this._patchClient()); | ||
} | ||
shimmer.wrap(this._moduleExports, 'makeGenericClientConstructor', this._patchClient()); | ||
if (this._internalFilesExports['client']) { | ||
@@ -65,5 +63,3 @@ grpcClientModule = this._internalFilesExports['client']; | ||
} | ||
if (this._moduleExports.makeGenericClientConstructor) { | ||
shimmer.unwrap(this._moduleExports, 'makeGenericClientConstructor'); | ||
} | ||
shimmer.unwrap(this._moduleExports, 'makeGenericClientConstructor'); | ||
if (grpcClientModule) { | ||
@@ -100,6 +96,5 @@ shimmer.unwrap(grpcClientModule, 'makeClientConstructor'); | ||
const spanName = `grpc.${name.replace('/', '')}`; | ||
const parentSpan = plugin._getSpanContext(call.metadata); | ||
const spanOptions = { | ||
kind: types_1.SpanKind.SERVER, | ||
parent: parentSpan || undefined, | ||
parent: plugin._getSpanContext(call.metadata), | ||
}; | ||
@@ -210,7 +205,6 @@ plugin._logger.debug('patch func: %s', JSON.stringify(spanOptions)); | ||
const args = Array.prototype.slice.call(arguments); | ||
const currentSpan = plugin._tracer.getCurrentSpan(); | ||
const span = plugin._tracer | ||
.startSpan(name, { | ||
kind: types_1.SpanKind.CLIENT, | ||
parent: currentSpan || undefined, | ||
parent: plugin._tracer.getCurrentSpan(), | ||
}) | ||
@@ -217,0 +211,0 @@ .setAttribute(AttributeNames_1.AttributeNames.COMPONENT, GrpcPlugin.component); |
{ | ||
"name": "@opentelemetry/plugin-grpc", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "OpenTelemetry grpc automatic instrumentation package.", | ||
@@ -14,2 +14,3 @@ "main": "build/src/index.js", | ||
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", | ||
"precompile": "tsc --version", | ||
"compile": "tsc -p .", | ||
@@ -43,8 +44,11 @@ "fix": "gts fix", | ||
"devDependencies": { | ||
"@opentelemetry/node": "^0.3.0", | ||
"@opentelemetry/tracing": "^0.3.0", | ||
"@types/mocha": "^5.2.7", | ||
"@types/node": "^12.6.9", | ||
"@types/semver": "^6.2.0", | ||
"@types/shimmer": "^1.0.1", | ||
"@types/sinon": "^7.0.13", | ||
"codecov": "^3.5.0", | ||
"grpc": "~1.23.3", | ||
"codecov": "^3.6.1", | ||
"grpc": "^1.23.3", | ||
"gts": "^1.1.0", | ||
@@ -60,11 +64,9 @@ "mocha": "^6.2.0", | ||
"tslint-microsoft-contrib": "^6.2.0", | ||
"typescript": "^3.6.3" | ||
"typescript": "3.7.2" | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/core": "^0.2.0", | ||
"@opentelemetry/node": "^0.2.0", | ||
"@opentelemetry/tracing": "^0.2.0", | ||
"@opentelemetry/types": "^0.2.0", | ||
"@opentelemetry/core": "^0.3.0", | ||
"@opentelemetry/types": "^0.3.0", | ||
"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
3
41866
20
611
+ Added@opentelemetry/core@0.3.3(transitive)
+ Added@opentelemetry/types@0.3.3(transitive)
- Removed@opentelemetry/node@^0.2.0
- Removed@opentelemetry/tracing@^0.2.0
- Removed@opentelemetry/base@0.2.0(transitive)
- Removed@opentelemetry/core@0.2.0(transitive)
- Removed@opentelemetry/node@0.2.0(transitive)
- Removed@opentelemetry/scope-async-hooks@0.2.0(transitive)
- Removed@opentelemetry/scope-base@0.2.0(transitive)
- Removed@opentelemetry/tracing@0.2.0(transitive)
- Removed@opentelemetry/types@0.2.0(transitive)
- Removeddebug@4.3.7(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedis-core-module@2.15.1(transitive)
- Removedmodule-details-from-path@1.0.3(transitive)
- Removedms@2.1.3(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedrequire-in-the-middle@5.2.0(transitive)
- Removedresolve@1.22.8(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
Updated@opentelemetry/core@^0.3.0
Updated@opentelemetry/types@^0.3.0