Instrumentation Based on Choice of Javascript Modules

To complete the instrumentation, follow these steps based on your choice of Java Script modules.

ECMAScript Modules (ESM)
  1. In the appdynamics-lambda-extension Layers section, add theCisco AppDynamics layer. Give it the name Version ARNvalue as shown below:
    arn:aws:lambda:us-west-<###>:layer:appdynamics-lambda-nodejs-<###>
  2. In the appdynamics-lambda-nodejs-tracer.handler Runtime settings section, update the lambda handler to the Splunk AppDynamics specific handler,
    appdynamics-lambda-nodejs-tracer.handler
  3. In the Configuration section, add the following environment variables to the other Splunk AppDynamics variables.
    • APPDYNAMICS_APPLICATION_LAMBDA_HANDLER

    • APPDYNAMICS_IS_ESM_ENABLE true

CommonJS
  1. In the appdynamics-lambda-extension Layers section, add the Splunk AppDynamics layer. Give it the name Version ARN value as shown below:
    arn:aws:lambda:us-west-<###>:layer:appdynamics-lambda-nodejs-<###>
  2. In the appdynamics-lambda-nodejs-tracer.handler Runtime settings section, update the lambda handler to Splunk AppDynamics specific handler,
    appdynamics-lambda-nodejs-tracer.handler
  3. In the Configuration section, add the following environment variables to the other Splunk AppDynamics variables.
    • APPDYNAMICS_APPLICATION_LAMBDA_HANDLER

    • APPDYNAMICS_IS_ESM_ENABLE false

TypeScript
  1. In the appdynamics-lambda-extension Layers section, add theCisco AppDynamics layer. Give it the name Version ARN value as shown below.
    arn:aws:lambda:us-west-<###>:layer:appdynamics-lambda-nodejs-<###>
  2. In the appdynamics-lambda-nodejs-tracer.handler Runtime settings section, update the lambda handler to Splunk AppDynamics specific handler,
    appdynamics-lambda-nodejs-tracer.handler
  3. In the Configuration section, add the following environment variables to the other Splunk AppDynamics variables.
    • APPDYNAMICS_APPLICATION_LAMBDA_HANDLER

    • APPDYNAMICS_IS_ESM_ENABLE false true

Note: By default, the Node.js Serverless Tracer automatically discovers exit calls passed over HTTP or inter-AWS Lambda calls. You need to create an exit call if your function does not use these protocols. See Node.js Serverless Tracer API.