Deployment Integrations
On-premise Integrations
Platform Integrations

Instrument to Achieve Deeper Level of Visibility

If you're developing a distributed system composed of serverless functions, containers and VMs, it is important to be able to trace your transactions end-to-end with the great detail. You need to keep your system stable, be aware of bottlenecks in your application, and measure your system performance to keep it at the optimum level. In serverless-centric environments, it's harder to understand what actually happened in and between functions due to its distributed nature. Logs can help to some extent but they are not as helpful as they should be while revealing why your transactions are slow. In order to understand what's going on, you'll need to instrument your function and see the traces representing the lifecycle of distributed transactions with a time line. Thundra is the only vendor which can provide end-to-end visibility through instrumentation. End-to-end means understanding and managing the aggregate set of distributed services an application consumes down to the line level of the runtime code for every local service or container-based application.

Connecting Thundra to your AWS account helps you display the basic data such as logs and metrics of your functions and invocations. For some people, this might be enough but if you're looking for a deeper level visibility and architectural overview in your system, you will need to step into instrumentation.

To instrument your code you have 3 options:

  • Manual instrumentation

  • Automated instrumentation

  • Instrumentation through Thundra console

Manual Instrumentation

With manual instrumentation, you can add custom spans to your function. These spans will be displayed on Thundra that allows you to observe your function behaviour. For example; you can start a span while your code starts to run a complex algorithm, and close it at the end of it. You can set custom tags in your span in order to see what actually happned in this code block.

To manually instrument Lambda function, you need to make code changes. You can get more detailed information to instrument your function for each environment: Java, Python, NodeJS, .NET and Go.

Automated Instrumentation

Automated instrumentation also provides you to measure execution time for Lambda code. By instrumenting your Lambda function you are able to have end to end visibility with no code change required. By default, Thundra makes automated instrumentation for AWS resources (except for Kinesis and Firehose), HTTP endpoints, Redis caches, MySQL, PostgreSQL tables and so on.

You can have more detailed information on how to instrument your Lambda function automatically for each environment: Java, Python, NodeJS, .NET and Go.

Instrumentation through Console

Even if it's very straightforward to install Thundra libraries in each runtime with Lambda Layers, AWS SAM or any tool, it still requires a modification in .yaml files and/or function configuration in Lambda functions.

In order to alleviate this manual process, you can instrument your functions directly from console. To instrument your functions from console, you have to connect your AWS account with Thundra from here. Note that Thundra updates your function configuration in your AWS account with this option. The steps that are automatically conducted are:

  • Adding Thundra Layer to your function.

  • Changing the runtime of your function to a custom runtime provided by Thundra. (for Node.js, .NET, and Java)

  • Assigning a Thundra API key.

You can get more information about how to make this here.