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.3.3 to 0.4.0

14

build/src/grpc.js

@@ -19,3 +19,3 @@ "use strict";

const core_1 = require("@opentelemetry/core");
const types_1 = require("@opentelemetry/types");
const api_1 = require("@opentelemetry/api");
const path = require("path");

@@ -96,3 +96,3 @@ const shimmer = require("shimmer");

const spanOptions = {
kind: types_1.SpanKind.SERVER,
kind: api_1.SpanKind.SERVER,
parent: plugin._getSpanContext(call.metadata),

@@ -143,3 +143,3 @@ };

else {
span.setStatus({ code: types_1.CanonicalCode.OK });
span.setStatus({ code: api_1.CanonicalCode.OK });
span.setAttribute(AttributeNames_1.AttributeNames.GRPC_STATUS_CODE, plugin._moduleExports.status.OK.toString());

@@ -216,3 +216,3 @@ }

.startSpan(name, {
kind: types_1.SpanKind.CLIENT,
kind: api_1.SpanKind.CLIENT,
parent: plugin._tracer.getCurrentSpan(),

@@ -249,3 +249,3 @@ })

else {
span.setStatus({ code: types_1.CanonicalCode.OK });
span.setStatus({ code: api_1.CanonicalCode.OK });
span.setAttribute(AttributeNames_1.AttributeNames.GRPC_STATUS_CODE, plugin._moduleExports.status.OK.toString());

@@ -275,3 +275,3 @@ }

[AttributeNames_1.AttributeNames.GRPC_METHOD]: original.path,
[AttributeNames_1.AttributeNames.GRPC_KIND]: types_1.SpanKind.CLIENT,
[AttributeNames_1.AttributeNames.GRPC_KIND]: api_1.SpanKind.CLIENT,
});

@@ -304,3 +304,3 @@ this._setSpanContext(metadata, span.context());

call.on('status', (status) => {
span.setStatus({ code: types_1.CanonicalCode.OK });
span.setStatus({ code: api_1.CanonicalCode.OK });
span.setAttribute(AttributeNames_1.AttributeNames.GRPC_STATUS_CODE, status.code.toString());

@@ -307,0 +307,0 @@ endSpan();

@@ -16,3 +16,3 @@ /*!

*/
import { CanonicalCode, Status } from '@opentelemetry/types';
import { CanonicalCode, Status } from '@opentelemetry/api';
import * as grpcTypes from 'grpc';

@@ -19,0 +19,0 @@ export declare const findIndex: <T>(args: T[], fn: (arg: T) => boolean) => number;

@@ -18,3 +18,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const types_1 = require("@opentelemetry/types");
const api_1 = require("@opentelemetry/api");
// Equivalent to lodash _.findIndex

@@ -37,3 +37,3 @@ exports.findIndex = (args, fn) => {

if (status !== 0 && !status) {
return types_1.CanonicalCode.UNKNOWN;
return api_1.CanonicalCode.UNKNOWN;
}

@@ -40,0 +40,0 @@ return status;

@@ -16,2 +16,2 @@ /*!

*/
export declare const VERSION = "0.3.3";
export declare const VERSION = "0.4.0";

@@ -19,3 +19,3 @@ "use strict";

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.3.3';
exports.VERSION = '0.4.0';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/plugin-grpc",
"version": "0.3.3",
"version": "0.4.0",
"description": "OpenTelemetry grpc automatic instrumentation package.",

@@ -10,3 +10,3 @@ "main": "build/src/index.js",

"test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts",
"tdd": "yarn test -- --watch-extensions ts --watch",
"tdd": "npm run test -- --watch-extensions ts --watch",
"clean": "rimraf build/*",

@@ -45,4 +45,4 @@ "check": "gts check",

"devDependencies": {
"@opentelemetry/node": "^0.3.3",
"@opentelemetry/tracing": "^0.3.3",
"@opentelemetry/node": "^0.4.0",
"@opentelemetry/tracing": "^0.4.0",
"@types/mocha": "^5.2.7",

@@ -63,3 +63,3 @@ "@types/node": "^12.6.9",

"ts-node": "^8.6.2",
"tslint-consistent-codestyle": "^1.15.1",
"tslint-consistent-codestyle": "^1.16.0",
"tslint-microsoft-contrib": "^6.2.0",

@@ -69,6 +69,6 @@ "typescript": "3.7.2"

"dependencies": {
"@opentelemetry/core": "^0.3.3",
"@opentelemetry/types": "^0.3.3",
"@opentelemetry/api": "^0.4.0",
"@opentelemetry/core": "^0.4.0",
"shimmer": "^1.2.1"
}
}

@@ -25,5 +25,5 @@ # OpenTelemetry gRPC Instrumentation for Node.js

```javascript
const { NodeTracerRegistry } = require('@opentelemetry/node');
const { NodeTracerProvider } = require('@opentelemetry/node');
const registry = new NodeTracerRegistry({
const provider = new NodeTracerProvider({
plugins: {

@@ -39,7 +39,7 @@ grpc: {

To load all the [supported plugins](https://github.com/open-telemetry/opentelemetry-js#plugins), use below approach. Each plugin is only loaded when the module that it patches is loaded; in other words, there is no computational overhead for listing plugins for unused modules.
To load all of the [supported plugins](https://github.com/open-telemetry/opentelemetry-js#plugins), use below approach. Each plugin is only loaded when the module that it patches is loaded; in other words, there is no computational overhead for listing plugins for unused modules.
```javascript
const { NodeTracerRegistry } = require('@opentelemetry/node');
const { NodeTracerProvider } = require('@opentelemetry/node');
const registry = new NodeTracerRegistry();
const provider = new NodeTracerProvider();
```

@@ -46,0 +46,0 @@

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