Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 988 Bytes

README.md

File metadata and controls

49 lines (33 loc) · 988 Bytes

AWS X-Ray Instrumentation

ECS Fargate cluster with X-Ray Golang application instrumentation.

Create the infrastructure:

terraform -chdir=aws init
terraform -chdir=aws apply -auto-approve

A sampling rule will be created and detect incoming requests for /api/*. The X-Ray SDK automatically uses this sampling rule based on the scope settings.

Golang

Once the cluster is created, build and push the Golang application image to ECR:

bash ./app-golang/ecr.sh

Node.js

Deploying the Node.js version of the application:

bash ./app-nodejs/ecr.sh

Reference to init a new TypeScript project with yarn in case it helps setting up the environment:

corepack enable
yarn init -2
yarn add typescript --dev
yarn tsc --init

Running locally:

nvm use 18
yarn install
yarn dev