Skip to content

Proof of Concept using AWS Lambda, Go, OpenTelemetry (OTel), as well as Tailcall as an alternative to AppSync Serverless GraphQL

Notifications You must be signed in to change notification settings

kevinmichaelchen/aws-lambda-go-otel-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-lambda-go-otel-poc

Proof of concept using aws-lambda-go and OpenTelemetry.

This may interest you if you use AWS, Lambdas, Golang, and OpenTelemetry … or if you're looking to emulate AppSync Serverless GraphQL locally and do not wish to pay for a LocalStack license.

Getting started

Step 0: Prerequisites

All you need is Docker and pkgx.

Step 1: Run everything

pkgx task@latest run

Step 2: Invoking the Lambda

(With the CLI)

pkgx awslocal@latest \
  lambda invoke \
    --function-name my-lambda \
    --cli-binary-format raw-in-base64-out \
    --payload '{"body": "{\"id\": \"10\"}" }' \
    output.txt

(With HTTP)

pkgx http \
  http://localhost:4566/2015-03-31/functions/my-lambda/invocations \
  id="4"

(With GraphQL)

mutation {
  invokeLambda(input: {id: "1"}) {
    id
  }
}

Step 3: Viewing the trace

Open the Jaeger UI.

Miscellaneous

Remaining Questions

  • ADOT: Do we need to use the AWS Distro of OTel Collector?

Environment Variables

The default OTel env vars should be fine.

See their “OTLP Exporter Configuration” guide.

About

Proof of Concept using AWS Lambda, Go, OpenTelemetry (OTel), as well as Tailcall as an alternative to AppSync Serverless GraphQL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages