https://github.com/epomatti/aws-xray
AWS X-Ray telemetry
https://github.com/epomatti/aws-xray
aws aws-xray ecs fargate go golang terraform x-ray xray
Last synced: 7 months ago
JSON representation
AWS X-Ray telemetry
- Host: GitHub
- URL: https://github.com/epomatti/aws-xray
- Owner: epomatti
- License: mit
- Created: 2023-08-22T21:44:16.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-24T12:40:33.000Z (about 2 years ago)
- Last Synced: 2025-01-17T18:36:32.364Z (9 months ago)
- Topics: aws, aws-xray, ecs, fargate, go, golang, terraform, x-ray, xray
- Language: HCL
- Homepage:
- Size: 941 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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][1] 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:
```sh
bash ./app-golang/ecr.sh
```## Node.js
Deploying the Node.js version of the application:
```sh
bash ./app-nodejs/ecr.sh
```Reference to init a new TypeScript project with `yarn` in case it helps setting up the environment:
```sh
corepack enable
yarn init -2
yarn add typescript --dev
yarn tsc --init
```Running locally:
```sh
nvm use 18
yarn install
yarn dev
```[1]: https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-go-configuration.html#xray-sdk-go-configuration-sampling