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

@opentelemetry/instrumentation-grpc

Package Overview
Dependencies
Maintainers
4
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/instrumentation-grpc - npm Package Compare versions

Comparing version 0.16.0 to 0.16.1-alpha.6

6

build/src/grpc.js

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

else {
span.setStatus({ code: api_1.StatusCode.UNSET });
span.setStatus({ code: api_1.SpanStatusCode.UNSET });
span.setAttribute(semantic_conventions_1.RpcAttribute.GRPC_STATUS_CODE, grpcClient.status.OK.toString());

@@ -274,3 +274,3 @@ }

else {
span.setStatus({ code: api_1.StatusCode.UNSET });
span.setStatus({ code: api_1.SpanStatusCode.UNSET });
span.setAttribute(semantic_conventions_1.RpcAttribute.GRPC_STATUS_CODE, grpcClient.status.OK.toString());

@@ -327,3 +327,3 @@ }

call.on('status', (status) => {
span.setStatus({ code: api_1.StatusCode.UNSET });
span.setStatus({ code: api_1.SpanStatusCode.UNSET });
span.setAttribute(semantic_conventions_1.RpcAttribute.GRPC_STATUS_CODE, status.code.toString());

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

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

var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};

@@ -28,0 +28,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -1,2 +0,2 @@

import { StatusCode, Status } from '@opentelemetry/api';
import { SpanStatusCode, SpanStatus } from '@opentelemetry/api';
import type * as grpcTypes from 'grpc';

@@ -6,7 +6,7 @@ import { IgnoreMatcher } from './types';

/**
* Convert a grpc status code to an opentelemetry Status code.
* Convert a grpc status code to an opentelemetry SpanStatus code.
* @param status
*/
export declare const _grpcStatusCodeToOpenTelemetryStatusCode: (status?: grpcTypes.status | undefined) => StatusCode;
export declare const _grpcStatusCodeToSpanStatus: (status: number) => Status;
export declare const _grpcStatusCodeToOpenTelemetryStatusCode: (status?: grpcTypes.status | undefined) => SpanStatusCode;
export declare const _grpcStatusCodeToSpanStatus: (status: number) => SpanStatus;
/**

@@ -13,0 +13,0 @@ * Returns true if the current plugin configuration

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

// Equivalent to lodash _.findIndex
exports.findIndex = (args, fn) => {
const findIndex = (args, fn) => {
let index = -1;

@@ -32,15 +32,18 @@ for (const arg of args) {

};
exports.findIndex = findIndex;
/**
* Convert a grpc status code to an opentelemetry Status code.
* Convert a grpc status code to an opentelemetry SpanStatus code.
* @param status
*/
exports._grpcStatusCodeToOpenTelemetryStatusCode = (status) => {
const _grpcStatusCodeToOpenTelemetryStatusCode = (status) => {
if (status !== undefined && status === 0) {
return api_1.StatusCode.UNSET;
return api_1.SpanStatusCode.UNSET;
}
return api_1.StatusCode.ERROR;
return api_1.SpanStatusCode.ERROR;
};
exports._grpcStatusCodeToSpanStatus = (status) => {
exports._grpcStatusCodeToOpenTelemetryStatusCode = _grpcStatusCodeToOpenTelemetryStatusCode;
const _grpcStatusCodeToSpanStatus = (status) => {
return { code: exports._grpcStatusCodeToOpenTelemetryStatusCode(status) };
};
exports._grpcStatusCodeToSpanStatus = _grpcStatusCodeToSpanStatus;
/**

@@ -72,3 +75,3 @@ * Returns true if methodName matches pattern

*/
exports._methodIsIgnored = (methodName, ignoredMethods) => {
const _methodIsIgnored = (methodName, ignoredMethods) => {
if (!ignoredMethods) {

@@ -85,2 +88,3 @@ // No ignored gRPC methods

};
exports._methodIsIgnored = _methodIsIgnored;
//# sourceMappingURL=utils.js.map
{
"name": "@opentelemetry/instrumentation-grpc",
"version": "0.16.0",
"version": "0.16.1-alpha.6+9cfa92c4",
"description": "OpenTelemetry grpc automatic instrumentation package.",

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

"@opentelemetry/core": "^0.16.0",
"@opentelemetry/node": "^0.16.0",
"@opentelemetry/node": "^0.16.1-alpha.6+9cfa92c4",
"@opentelemetry/tracing": "^0.16.0",

@@ -59,3 +59,3 @@ "@types/mocha": "8.2.0",

"grpc": "1.24.4",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",

@@ -69,10 +69,10 @@ "node-pre-gyp": "0.17.0",

"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",
"@opentelemetry/instrumentation": "^0.16.0",
"@opentelemetry/instrumentation": "^0.16.1-alpha.6+9cfa92c4",
"@opentelemetry/semantic-conventions": "^0.16.0"
},
"gitHead": "e68863f8e63854b08ad13fb54677294ac6d6b681"
"gitHead": "9cfa92c4a5a56ceeaeaa8d043ee2eb00a561c55a"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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