Deployment Integrations
On-premise Integrations
Platform Integrations

Integration Options

Programmatic Configuration
Programmatic Configuration

Step 1: Installation

Install the agent using the following command:

Import thundra-lambda-agent-go
import "github.com/thundra-io/thundra-lambda-agent-go/v2/thundra" // with go modules enabled (GO111MODULE=on or outside GOPATH) for version >= v2.3.1
import "github.com/thundra-io/thundra-lambda-agent-go/thundra" // with go modules disabled

Step 2: Wrap your handler

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

Wrap your lambda handler
package main
import (
"github.com/aws/aws-lambda-go/lambda"
// thundra go agent import here
)
// Your lambda handler
func handler() (string, error) {
return "Hello, Thundra!", nil
}
func main() {
// Wrap your lambda handler with Thundra
lambda.Start(thundra.Wrap(handler))
}

Step 3: Build & Deploy

Then, just build and deploy your executable to AWS as regular. In order to see your invocations in Thundra web console make sure that you have set thundra_apiKeyenvironment variable to the API key you got from the Thundra web console . You can set the environment variables through AWS Lambda console, in your serverless.yml file or the using the other method of your choice.

The API Key environment variable
thundra_apiKey: your_api_key

Step 4: Invoke your function!

Now you can try to invoke your Lambda function and see the details of your invocation in the Thundra console!