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

How To Use Thundra

In this section, learn how to use Thundra for detailed tracing, metrics, and logs.

All you have to do is wrap your lambda handler with thundra.Wrap :

package main

import (
	"github.com/aws/aws-lambda-go/lambda"
	"github.com/thundra-io/thundra-lambda-agent-go/metric"
	"github.com/thundra-io/thundra-lambda-agent-go/thundra"
	"github.com/thundra-io/thundra-lambda-agent-go/trace"
)

//Your lambda handler
func hello() (string, error) {
	return "Hello ƛ!", nil
}

func main() {
	// Instantiate Thundra Agent with Trace & Metric Support
	tr := trace.New()
	m := metric.New()
	t := thundra.NewBuilder().
	            AddPlugin(tr).
	            AddPlugin(m).
	            Build()
	
	// Wrap your lambda function with Thundra
	lambda.Start(thundra.Wrap(hello, t))
}

Later just build and deploy your executable to AWS as regular.

Configuration

After installing and migrating your project you need to register to Thundra website and create an API Key following the instructions described in Configuration. Optionally you can set API Key programmatically too:

thundra.SetApiKey(key String)

In order to set automatic instrumentation see How to Setup Async Monitoring