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

Trace Support

Trace support can be used by both Automated and Manual instrumentation, as mentioned in Python's Instrumentation documentation. With Thundra’s Trace Support, coupled with Instrumentation you can view how your Lambda functions send and receive data represented by spans.

Spans through Instrumentation

Without instrumentation, the Thundra console displays a single span depicting the running of the Lambda function.

Using Trace with Manual Instrumentation

Configuring Thundra’s Trace Support in the Python agent involves declaring a trace object at the start of your Lambda function. It must be noted that Trace Support is by default enabled when you wrap your function. However, if you would like to configure your Trace Support, along with performing manual instrumentation, then you must get a tracer instance with the command ThundraTracer.getInstance().

To activate spans, you must then start a span from the trace instance, and ensure that the parts of the function that you do wish to monitor lie within the scope of the span. This can be done by the start_active_span method from the tracer object. Moreover, the initialization parameter that should be defined is operation_name, which indicates the name of the span relevant to the block of the Lambda function that you would like to monitor.

You can find a detailed list of initialization parameters here.

Using Trace with Automated Instrumentation

To use Trace Support with automated instrumentation you shall have to import Traceable from Thundra’s trace plugin as below:

from thundra.plugins.trace.traceable import Traceable

Using Traceable simplifies the way you can use Trace Support in your Lambda functions as configuring Trace Support now simply involves using the @Traceable decorator in the start of each function you would like to monitor. Three initialization parameters can be passed depending on what you would like to monitor within your Trace spans. These include:

  • Trace_args - to keep a track of the arguments within the scope of your span
  • Trace_return_values - to monitor all values within the scope of your span
  • Trace_error - to monitor any errors, if any, that is created under the scope of your span

Trace Support

Suggested Edits are limited on API Reference Pages

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