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

Configuration

You can configure Thundra using environment variables or set them programmatically. Environment varialbes have higher precedence over setting them programmatically.

1. Environment Variables

Name
Type
Default Value

thundra_apiKey

string

-

thundra_applicationProfile

string

default

thundra_lambda_disable

bool

false

thundra_lambda_trace_request_disable

bool

false

thundra_lambda_trace_response_disable

bool

false

thundra_lambda_publish_cloudwatch_enable

bool

false

thundra_lambda_publish_rest_baseUrl

string

thundra_log_logLevel

string

-

thundra_lambda_debug_enable

bool

false

thundra_lambda_timeout_margin

int

200

thundra_apiKey

Specifies the api key to send the monitor data through.
You won't be able to publish your data without setting an api key.
You can generate an api key at Thundra, visit API keys to learn more.

thundra_applicationProfile

Specifies the profile where the monitor data was collected from.
Profiles are used for representing different environments such as "development", "staging", "production", etc..

thundra_lambda_disable

Set this true if you want to disable Thundra.

thundra_lambda_request_disable

Set this true if you don't want to send your lambda function's request to Thundra.

thundra_lambda_response_disable

Set this true if you don't want to send your lambda function's response to Thundra.

thundra_lambda_publish_cloudwatch_enable

Set this true if you want to enable async monitoring.
Note that only setting this is not enough, you should do a little more.
Check out How to Setup Async Monitoring for more information.

thundra_lambda_publish_rest_baseUrl

Set this if you want to change the URL Thundra agent sends reports to.
Default is set to https://collector.thundra.io/api.

Note: "/monitor-datas" is added to URL automatically. For example in the default case it will send the data to https://collector.thundra.io/api/monitor-datas.

thundra_log_logLevel

Set this to determine the minimum level of log thundra_log.Logger should collect. See log levels for more information.

thundra_lambda_debug_enable

If you set it true Thundra will print collected data to CloudWatch logs. This can be helpful to debug to see if agent behaves correctly. If you find any problem then you can reach us by sending these logs.

thundra_lambda_timeout_margin

Specifies how much time is needed to send report before lambda is timed out. You should change this variable if the timeout_margin is not enough and you may not see your timed out functions on Thundra Console. The default value is 200 ms.

2. Setting programatically

Instead of setting as an environment variable, you can use the following functions to configure your thundra.

SetAPIKey(apikey string)

SetAPIKey is used to set ApiKey to use Thundra.
You can generate an api key at Thundra, visit API keys to learn more.

// ... means you can add more configurations if you want
t := thundra.NewBuilder()....SetApiKey("#YOUR API KEY")Build()

EnableWarmup()

Enables warming up to reduce cold starts of your lambda. Note that only setting this is not enough, you should do a little more.
Check out How to Warmup for more information.

// ... means you can add more configurations if you want
t := thundra.NewBuilder()...EnableWarmup().Build()

AddPlugin()

AddPlugin is used to add plugins thundra. Trace and Metrics are two plugins that are supported currently.
You need to initialize a plugin object and pass it as a parameter in order to enable it.

tr := trace.NewTrace()
m := metric.NewBuilder().Build()
// ... means you can add more configurations if you want
t := thundra.NewBuilder()....AddPlugin(tr).AddPlugin(m).Build()