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

@opentelemetry/plugin-grpc

Package Overview
Dependencies
Maintainers
5
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/plugin-grpc - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

16

build/src/grpc.js

@@ -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"
}
}
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