How to use the @opencensus/instrumentation-grpc.plugin function in @opencensus/instrumentation-grpc

To help you get started, we’ve selected a few @opencensus/instrumentation-grpc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github census-ecosystem / opencensus-experiments / interoptest / src / nodejsservice / server.js View on Github external
function enableGrpcPlugin (tracer) {
  // 1. Define basedir and version
  const basedir = path.dirname(require.resolve('grpc'));
  const version = require(path.join(basedir, 'package.json')).version;

  // 2. Enable GRPC plugin: Method that enables the instrumentation patch.
  grpcPlugin.plugin.enable(grpc, tracer, version, basedir);
}

@opencensus/instrumentation-grpc

Opencensus grpc automatic instrumentation package.

Apache-2.0
Latest version published 4 years ago

Package Health Score

47 / 100
Full package analysis