Thundra

Thundra: Serverless Observability for AWS Lambda

The black box nature of AWS Lambda and other serverless environments means that identifying and fixing performance issues is difficult and time-consuming. Built for straightforward debugging, monitoring, and observability, Thundra provides deep insight into your entire serverless environment. Thundra collects and correlates all your metrics, logs, and traces, allowing you to quickly identify problematic invocations and also analyzes external services associated with that function. With Thundra’s zero overhead and automated instrumentation capabilities, your developers are free to write code without worrying about bulking up their Lambdas or wasting time on chasing black box problems.

Get Started    Discussions

Custom Runtime and Layer Support

Concepts

Layers

A layer is an artifact that contains arbitrary code and data that can be referenced by zero, one, or more functions at the same time. During a function create or update time a layer is merged by the Lambda service with the function code. When a function is invoked the combined artifact (function and layer) is mounted onto Lambda’s execution environment making its contents available for the function execution. The content of the layer packages is extracted onto /opt folder. Versioning of published layer is handled by AWS Lambda by giving monotonically increasing version number with every release. Resource-based policies can be assigned to layers to give them account based or public access.

Contents of Thundra Node Layer

Thundra Node Layer contains all Thundra NodeJS agent dependencies and Thundra Node Custom Runtime implementation files. Here is the directory structure for Thundra Node Layer:

|-- bootstrap  # entry point for custom runtime, starts index.js
|-- nodejs
|		|-- index.js # Custom Runtime Implementation         
|		|-- node # Node 8.10 binary, used by Custom Runtime              
|		|-- node_modules # Contains Thundra NodeJS agent dependencies     
|		|-- package-lock.json # Contains Thundra NodeJS agent build info 
|		|-- package.json # Contains Thundra NodeJS agent build info 

   
      

Custom Runtime

Custom Runtime feature in AWS Lambda which allows you to use any programming language to run your functions. By “Custom Runtime”, you provide your deployment package (typically .zip files) which contains bootstrap file as an entry point where it can be an executable file such as a script or binary file. In here AWS Lambda platform is not interested in which programming language or runtime are you using, but just starts your bootstrap. It gives you more flexibility than managed runtimes but you need to implement the AWS Lambda “Runtime API” yourself. Thundra Node Layer includes a Custom Runtime Implementation which automatically wraps your AWS Lambda Handler Code with Thundra NodeJS Agent.

How to use Thundra Node Layer and Custom Runtime

With Thundra Node Layer and Custom Runtime implementation, you can integrate your existing Lambda Functions with Thundra so easy without changing any of your code. The document shows configuration on a sample hello-world lambda function from a serverless repo. You can try Thundra Node Layer and Custom Runtime with any of your own deployed lambda functions.

  • First, go to your AWS Lambda Function Page and Click Layers in Designers tab

-Then Click Add Layer

  • Select Provide a layer version ARN and copy arn:aws:lambda:<aws-region>:269863060030:layer:thundra-lambda-node-layer:<latest-version> the latest ARN of Thundra Node Layer and then click add. For this example, since we are using us-west-2 region, ARN value will be arn:aws:lambda:us-west-2:269863060030:layer:thundra-lambda-node-layer:<latest-version>. Latest version of the layers can be seen here
  • You should see Thundra Node Layer added as a layer to your Lambda Function now.
  • Now, select Use custom runtime in function code or layer as Lambda Runtime and update your handler with your handler. In our case, it is index.handler. Then finally, enter your thundra api key as an environment variable.
  • You integrated Thundra NodeJS Agent without changing any of your code. You can enjoy serverless monitoring.

Latest Layer Version

The latest version of the layer is 10.

You can add it to your project by copying the following line and changing the region.

arn:aws:lambda:<aws-region>:269863060030:layer:thundra-lambda-node-layer:10

Custom Runtime and Layer Support


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.