JSPM

  • Created
  • Published
  • Downloads 1904397
  • Score
    100M100P100Q226119F
  • License Apache-2.0

OpenTelemetry AWS Lambda automatic instrumentation package.

Package Exports

  • @opentelemetry/instrumentation-aws-lambda

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@opentelemetry/instrumentation-aws-lambda) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

OpenTelemetry AWS Lambda Instrumentation for Node.js

NPM Published Version dependencies devDependencies Apache License

This module provides automatic instrumentation for AWS Lambda.

This module is currently under active development and not ready for general use.

Installation

npm install --save @opentelemetry/instrumentation-aws-lambda

Usage

Create a file to initialize the instrumentation, such as lambda-wrapper.js.

const { NodeTracerProvider } = require('@opentelemetry/node');
const { AwsLambdaInstrumentation } = require('@opentelemetry/instrumentation-aws-lambda');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');

const provider = new NodeTracerProvider();
provider.register();

registerInstrumentations({
  instrumentations: [
    new AwsLambdaInstrumentation()
  ],
  tracerProvider: provider,
});

In your Lambda function configuration, add or update the NODE_OPTIONS environment variable to require the wrapper, e.g.,

NODE_OPTIONS=--require lambda-wrapper

License

Apache 2.0 - See LICENSE for more information.