Socket
Socket
Sign inDemoInstall

@opentelemetry/instrumentation-grpc

Package Overview
Dependencies
Maintainers
3
Versions
183
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.51.1 to 0.52.0

8

build/src/instrumentation.d.ts
import type { GrpcInstrumentationConfig } from './types';
import { InstrumentationNodeModuleDefinition, InstrumentationBase } from '@opentelemetry/instrumentation';
export declare class GrpcInstrumentation extends InstrumentationBase {
export declare class GrpcInstrumentation extends InstrumentationBase<GrpcInstrumentationConfig> {
private _metadataCapture;
constructor(config?: GrpcInstrumentationConfig);
init(): InstrumentationNodeModuleDefinition[];
/**
* @internal
* Public reference to the protected BaseInstrumentation `_config` instance to be used by this
* plugin's external helper functions
*/
getConfig(): GrpcInstrumentationConfig;
setConfig(config?: GrpcInstrumentationConfig): void;

@@ -14,0 +8,0 @@ /**

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

class GrpcInstrumentation extends instrumentation_1.InstrumentationBase {
constructor(config) {
constructor(config = {}) {
super('@opentelemetry/instrumentation-grpc', version_1.VERSION, config);

@@ -35,27 +35,9 @@ this._metadataCapture = this._createMetadataCapture();

return [
new instrumentation_1.InstrumentationNodeModuleDefinition('@grpc/grpc-js', ['1.*'], moduleExports => {
if ((0, instrumentation_1.isWrapped)(moduleExports.Server.prototype.register)) {
this._unwrap(moduleExports.Server.prototype, 'register');
}
new instrumentation_1.InstrumentationNodeModuleDefinition('@grpc/grpc-js', ['^1.0.0'], moduleExports => {
// Patch Server methods
this._wrap(moduleExports.Server.prototype, 'register', this._patchServer());
// Patch Client methods
if ((0, instrumentation_1.isWrapped)(moduleExports.makeGenericClientConstructor)) {
this._unwrap(moduleExports, 'makeGenericClientConstructor');
}
this._wrap(moduleExports, 'makeGenericClientConstructor', this._patchClient(moduleExports));
if ((0, instrumentation_1.isWrapped)(moduleExports.makeClientConstructor)) {
this._unwrap(moduleExports, 'makeClientConstructor');
}
this._wrap(moduleExports, 'makeClientConstructor', this._patchClient(moduleExports));
if ((0, instrumentation_1.isWrapped)(moduleExports.loadPackageDefinition)) {
this._unwrap(moduleExports, 'loadPackageDefinition');
}
this._wrap(moduleExports, 'loadPackageDefinition', this._patchLoadPackageDefinition(moduleExports));
if ((0, instrumentation_1.isWrapped)(moduleExports.Client.prototype)) {
this._unwrap(moduleExports.Client.prototype, 'makeUnaryRequest');
this._unwrap(moduleExports.Client.prototype, 'makeClientStreamRequest');
this._unwrap(moduleExports.Client.prototype, 'makeServerStreamRequest');
this._unwrap(moduleExports.Client.prototype, 'makeBidiStreamRequest');
}
this._wrap(moduleExports.Client.prototype, 'makeUnaryRequest', this._patchClientRequestMethod(moduleExports, false));

@@ -80,11 +62,3 @@ this._wrap(moduleExports.Client.prototype, 'makeClientStreamRequest', this._patchClientRequestMethod(moduleExports, false));

}
/**
* @internal
* Public reference to the protected BaseInstrumentation `_config` instance to be used by this
* plugin's external helper functions
*/
getConfig() {
return super.getConfig();
}
setConfig(config) {
setConfig(config = {}) {
super.setConfig(config);

@@ -91,0 +65,0 @@ this._metadataCapture = this._createMetadataCapture();

2

build/src/version.d.ts

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

export declare const VERSION = "0.51.1";
export declare const VERSION = "0.52.0";
//# sourceMappingURL=version.d.ts.map

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

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.51.1';
exports.VERSION = '0.52.0';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/instrumentation-grpc",
"version": "0.51.1",
"description": "OpenTelemetry grpc automatic instrumentation package.",
"version": "0.52.0",
"description": "OpenTelemetry instrumentation for `@grpc/grpc-js` rpc client and server for gRPC framework",
"main": "build/src/index.js",

@@ -22,3 +22,4 @@ "types": "build/src/index.d.ts",

"peer-api-check": "node ../../../scripts/peer-api-check.js",
"protos:generate": "cd test/fixtures && buf generate"
"protos:generate": "cd test/fixtures && buf generate",
"align-api-deps": "node ../../../scripts/align-api-deps.js"
},

@@ -53,14 +54,14 @@ "keywords": [

"@grpc/proto-loader": "^0.7.10",
"@opentelemetry/api": "1.8.0",
"@opentelemetry/context-async-hooks": "1.24.1",
"@opentelemetry/core": "1.24.1",
"@opentelemetry/sdk-trace-base": "1.24.1",
"@opentelemetry/sdk-trace-node": "1.24.1",
"@protobuf-ts/grpc-transport": "2.9.3",
"@protobuf-ts/runtime": "2.9.3",
"@protobuf-ts/runtime-rpc": "2.9.3",
"@opentelemetry/api": "1.9.0",
"@opentelemetry/context-async-hooks": "1.25.0",
"@opentelemetry/core": "1.25.0",
"@opentelemetry/sdk-trace-base": "1.25.0",
"@opentelemetry/sdk-trace-node": "1.25.0",
"@protobuf-ts/grpc-transport": "2.9.4",
"@protobuf-ts/runtime": "2.9.4",
"@protobuf-ts/runtime-rpc": "2.9.4",
"@types/mocha": "10.0.6",
"@types/node": "18.6.5",
"@types/semver": "7.5.6",
"@types/sinon": "10.0.20",
"@types/semver": "7.5.8",
"@types/sinon": "17.0.3",
"codecov": "3.8.3",

@@ -80,8 +81,8 @@ "cross-var": "1.1.0",

"dependencies": {
"@opentelemetry/instrumentation": "0.51.1",
"@opentelemetry/semantic-conventions": "1.24.1"
"@opentelemetry/instrumentation": "0.52.0",
"@opentelemetry/semantic-conventions": "1.25.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-grpc",
"sideEffects": false,
"gitHead": "41c2626fe0ed03e2e83bd79ee43c9bdf0ffd80d8"
"gitHead": "c4d3351b6b3f5593c8d7cbfec97b45cea9fe1511"
}

@@ -19,2 +19,6 @@ # OpenTelemetry gRPC Instrumentation for Node.js

## Supported Versions
- [`@grpc/grpc-js`](https://www.npmjs.com/package/@grpc/grpc-js) versions `^1.0.0`
## Usage

@@ -21,0 +25,0 @@

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