thundra-lambda-agent-go

module
v2.2.3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2020 License: Apache-2.0

README

Lambda Go Agent OpenTracing Badge CircleCI Go Report Card

Trace your AWS lambda functions with async monitoring by Thundra!

Check out Thundra docs for more information.

Usage

In order to trace your lambda usages with Thundra all you need to do is wrap your function.

package main

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

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

func main() {
	// Wrap your lambda handler with Thundra
	lambda.Start(thundra.Wrap(handler))
}

Later just build and deploy your executable to AWS as regular. Test your function on lambda console and visit Thundra to observe your function metrics.

Environment variables
Name Type Default Value
thundra_applicationProfile string default
thundra_agent_lambda_disable bool false
thundra_agent_lambda_timeout_margin number 200
thundra_agent_lambda_report_rest_baseUrl string https://api.thundra.io/v1
thundra_agent_lambda_trace_disable bool false
thundra_agent_lambda_metric_disable bool false
thundra_agent_lambda_log_disable bool false
thundra_log_logLevel string TRACE
thundra_agent_lambda_trace_request_skip bool false
thundra_agent_lambda_trace_response_skip bool false
thundra_agent_lambda_report_rest_trustAllCertificates bool false
thundra_agent_lambda_debug_enable bool false
thundra_agent_lambda_warmup_warmupAware bool false
Async Monitoring

Check out our docs to see how to configure Thundra and async monitoring to visualize your functions in Thundra.

Warmup Support

You can cut down cold starts easily by deploying our lambda function thundra-lambda-warmup.

Our agent handles warmup requests automatically so you don't need to make any code changes.

You just need to deploy thundra-lambda-warmup once, then you can enable warming up for your lambda by

  • setting its environment variable thundra_agent_lambda_warmup_warmupAware true OR
  • adding its name to thundra-lambda-warmup's environment variable thundra_lambda_warmup_function.

Check out this part in our docs for more information.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL