Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1b8681d
feat: update Python cdk-deploy
jeastham1993 Jul 25, 2025
738752e
Merge branch 'main' of github.com:DataDog/serverless-sample-app
jeastham1993 Jul 28, 2025
f2f286f
fix: add connection retry to product repository
jeastham1993 Jul 28, 2025
b5bbfba
feat: update activity service to support span links
jeastham1993 Jul 29, 2025
bc25697
fix: resolve issues with pricing service propagation
jeastham1993 Jul 29, 2025
07a7b8f
feat: bump versions and update tracing spans
jeastham1993 Jul 29, 2025
0f3a00e
feat: bump versions and update tracing spans
jeastham1993 Jul 29, 2025
069debc
feat: add publish span to event publisher
jeastham1993 Jul 29, 2025
1f7d8d7
fix: update traces
jeastham1993 Jul 29, 2025
5838ad7
Update src/product-management-service/src/product-api/outbox-processo…
jeastham1993 Jul 29, 2025
fd5be4f
Update src/product-management-service/src/product-acl/pricing-changed…
jeastham1993 Jul 29, 2025
8a4950c
Update src/product-management-service/src/product-acl/inventory-stock…
jeastham1993 Jul 29, 2025
f633e06
Update src/product-management-service/src/product-acl/inventory-stock…
jeastham1993 Jul 29, 2025
ab5ea67
chore: resolve PR feedback
jeastham1993 Jul 29, 2025
eb77911
fix: ensure span.Finish() is called'
jeastham1993 Jul 29, 2025
ea7438f
feat: update span links and semconv
jeastham1993 Aug 6, 2025
918c8ed
feat:add userid to telemetry
jeastham1993 Aug 6, 2025
115c17b
chore: update activity service name
jeastham1993 Aug 6, 2025
ec0fca3
feat: update semconv and span tags
jeastham1993 Aug 6, 2025
ff0aa39
feat: update trace propagation style
jeastham1993 Aug 6, 2025
39ce880
feat: update propagation for activityand order service
jeastham1993 Aug 7, 2025
b5be872
fix: remove unused import
jeastham1993 Aug 7, 2025
4416d82
feat: update README
jeastham1993 Aug 7, 2025
8110039
chore: undo pricing updates
jeastham1993 Aug 7, 2025
1708864
feat: update build image
jeastham1993 Aug 8, 2025
8c7e540
Merge branch 'main' of github.com:DataDog/serverless-sample-app
jeastham1993 Aug 8, 2025
ee07aac
fix: merge change
jeastham1993 Aug 8, 2025
2ce6fe1
feat: update build image
jeastham1993 Aug 8, 2025
0c859a1
fix: update base build image
jeastham1993 Aug 8, 2025
8428b96
feat: update to use build-all
jeastham1993 Aug 8, 2025
2921b3a
feat: update build to set env vars
jeastham1993 Aug 8, 2025
37fbb18
fix: update .NET install
jeastham1993 Aug 8, 2025
c05a5a0
fix: update .NET install
jeastham1993 Aug 12, 2025
4a9a338
feat: update span links
jeastham1993 Aug 13, 2025
e2ca2db
feat: update .NET propagation
jeastham1993 Aug 14, 2025
28f622e
fix: resolve load test config issues
jeastham1993 Aug 14, 2025
e8961fc
feat: update span links
jeastham1993 Aug 29, 2025
76ccacb
Merge branch 'main' into fix/build-image
jeastham1993 Aug 29, 2025
a561229
Update src/pricing-service/src/observability/observability.ts
jeastham1993 Aug 29, 2025
e98e161
Update src/loyalty-point-service/src/observability/observability.ts
jeastham1993 Aug 29, 2025
2e400dd
Update src/product-management-service/src/product-acl/inventory-stock…
jeastham1993 Aug 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/deploy-activity-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ jobs:
COMMIT_HASH: ${{ env.sha_short }}
VERSION: ${{ env.sha_short }}
ENV: ${{ env.sha_short }}
DD_API_KEY_SECRET_ARN: ${{secrets.EU_WEST_1_DD_API_KEY_SECRET_ARN}}
DD_API_KEY: ${{secrets.DD_API_KEY}}
DD_SITE: "datadoghq.eu"
run: |
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/deploy-inventory-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
env:
COMMIT_HASH: ${{ env.sha_short }}
ENV: "dev"
DD_API_KEY_SECRET_ARN: ${{secrets.US_EAST_1_DD_API_KEY_SECRET_ARN}}
DD_API_KEY: ${{secrets.DD_API_KEY}}
DD_SITE: "datadoghq.eu"
AWS_REGION: "us-east-1"
Expand Down Expand Up @@ -222,7 +221,6 @@ jobs:
COMMIT_HASH: ${{ env.sha_short }}
VERSION: ${{ env.sha_short }}
ENV: "dev"
DD_API_KEY_SECRET_ARN: ${{secrets.US_EAST_1_DD_API_KEY_SECRET_ARN}}
DD_API_KEY: ${{secrets.DD_API_KEY}}
DD_SITE: "datadoghq.eu"
AWS_REGION: "eu-central-1"
Expand All @@ -235,7 +233,6 @@ jobs:
COMMIT_HASH: ${{ env.sha_short }}
VERSION: ${{ env.sha_short }}
ENV: ${{ env.sha_short }}
DD_API_KEY_SECRET_ARN: ${{secrets.EU_WEST_1_DD_API_KEY_SECRET_ARN}}
DD_API_KEY: ${{secrets.DD_API_KEY}}
DD_SITE: "datadoghq.eu"
run: |
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/deploy-orders-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
env:
COMMIT_HASH: ${{ env.sha_short }}
ENV: "dev"
DD_API_KEY_SECRET_ARN: ${{secrets.US_EAST_1_DD_API_KEY_SECRET_ARN}}
DD_API_KEY: ${{secrets.DD_API_KEY}}
DD_SITE: "datadoghq.eu"
AWS_REGION: "us-east-1"
Expand Down Expand Up @@ -146,7 +145,6 @@ jobs:
env:
COMMIT_HASH: ${{ env.sha_short }}
ENV: "dev"
DD_API_KEY_SECRET_ARN: ${{secrets.EU_WEST_2_DD_API_KEY_SECRET_ARN}}
DD_API_KEY: ${{secrets.DD_API_KEY}}
DD_SITE: "datadoghq.eu"
AWS_REGION: "eu-west-2"
Expand Down Expand Up @@ -217,7 +215,6 @@ jobs:
env:
COMMIT_HASH: ${{ env.sha_short }}
ENV: "cdk-${{ env.sha_short }}"
DD_API_KEY_SECRET_ARN: ${{secrets.EU_WEST_1_DD_API_KEY_SECRET_ARN}}
DD_API_KEY: ${{secrets.DD_API_KEY}}
DD_SITE: "datadoghq.eu"
run: |
Expand All @@ -237,7 +234,6 @@ jobs:
env:
COMMIT_HASH: ${{ env.sha_short }}
ENV: "cdk-${{ env.sha_short }}"
DD_API_KEY_SECRET_ARN: ${{secrets.EU_WEST_1_DD_API_KEY_SECRET_ARN}}
DD_API_KEY: ${{secrets.DD_API_KEY}}
DD_SITE: "datadoghq.eu"
run: |
Expand All @@ -249,7 +245,6 @@ jobs:
env:
COMMIT_HASH: ${{ env.sha_short }}
ENV: "dev"
DD_API_KEY_SECRET_ARN: ${{secrets.EU_WEST_1_DD_API_KEY_SECRET_ARN}}
DD_API_KEY: ${{secrets.DD_API_KEY}}
DD_SITE: "datadoghq.eu"
run: |
Expand All @@ -270,7 +265,6 @@ jobs:
env:
COMMIT_HASH: ${{ env.sha_short }}
ENV: "dev"
DD_API_KEY_SECRET_ARN: ${{secrets.EU_WEST_1_DD_API_KEY_SECRET_ARN}}
DD_API_KEY: ${{secrets.DD_API_KEY}}
DD_SITE: "datadoghq.eu"
run: |
Expand Down Expand Up @@ -311,7 +305,6 @@ jobs:
env:
COMMIT_HASH: ${{ env.sha_short }}
ENV: "sam-${{ env.sha_short }}"
DD_API_KEY_SECRET_ARN: ${{secrets.US_EAST_1_DD_API_KEY_SECRET_ARN}}
DD_API_KEY: ${{secrets.DD_API_KEY}}
DD_SITE: "datadoghq.eu"
AWS_REGION: "eu-central-1"
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/deploy-user-management-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:
env:
COMMIT_HASH: ${{ env.sha_short }}
ENV: "dev"
DD_API_KEY_SECRET_ARN: ${{secrets.US_EAST_1_DD_API_KEY_SECRET_ARN}}
DD_API_KEY: ${{secrets.DD_API_KEY}}
DD_SITE: "datadoghq.eu"
AWS_REGION: "eu-central-1"
Expand Down Expand Up @@ -344,7 +343,6 @@ jobs:
# env:
# COMMIT_HASH: ${{ env.sha_short }}
# ENV: "dev"
# DD_API_KEY_SECRET_ARN: ${{secrets.US_EAST_1_DD_API_KEY_SECRET_ARN}}
# DD_API_KEY: ${{secrets.DD_API_KEY}}
# DD_SITE: "datadoghq.eu"
# AWS_REGION: "us-east-2"
Expand All @@ -367,7 +365,6 @@ jobs:
# env:
# COMMIT_HASH: ${{ env.sha_short }}
# ENV: "dev"
# DD_API_KEY_SECRET_ARN: ${{secrets.US_EAST_1_DD_API_KEY_SECRET_ARN}}
# DD_API_KEY: ${{secrets.DD_API_KEY}}
# DD_SITE: "datadoghq.eu"
# AWS_REGION: "us-east-2"
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,9 @@ If you wish to deploy the entire application there is a custom Docker image avai
source ~/.profile
./cdk-deploy-all.sh
```
5. Once deployment is complete exit the interactive shell by typing `exit`
6. Open your AWS console and check that all CloudFormation stacks deployments are complete
5. Open your AWS console and check that all CloudFormation stacks deployments are complete. The deployments run as background tasks, so it can take several minutes for the full deployment to complete.

There should be 7 stacks in total:
There should be 8 stacks in total:

- SharedResourcesStack
- OrdersService
Expand All @@ -111,6 +110,9 @@ If you wish to deploy the entire application there is a custom Docker image avai
- ProductService
- LoyaltyService
- PricingService
- ActivityService

6. Once deployment is complete exit the interactive shell by typing `exit`

### Delete Resources

Expand All @@ -120,7 +122,6 @@ Once you are finished testing, run the below commands to delete resources from y

```sh
docker run -it \
-v "$(pwd):/serverless-sample-app" \
-w "/serverless-sample-app" \
-e AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}" \
-e AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}" \
Expand Down
3 changes: 3 additions & 0 deletions build-image/local-build-essentials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ set -ex

apt-get update -y
apt-get install software-properties-common -y
add-apt-repository ppa:dotnet/backports --yes
add-apt-repository ppa:deadsnakes/ppa --yes
apt-get update -y
apt-get install -y \
curl \
wget \
git-all \
python3-pip \
python3.13 \
python-is-python3 \
Expand Down
86 changes: 67 additions & 19 deletions build-image/local-build.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
#!/usr/bin/bash
set -ex

echo "Pre-compile code to speed up first deployment."
apt-get install git-all -y
git clone https://github.com/DataDog/serverless-sample-app.git /serverless-sample-app
cd /serverless-sample-app && ./build-all.sh

# #############################################################
# ### Install frontend and loadtesting dependencies ###
# #############################################################

pushd /serverless-sample-app/src/frontend
npm i && docker build .
popd

pushd /serverless-sample-app/loadtest
npm i && docker build .
popd

export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
export M3_HOME=/opt/apache-maven-3.9.11
Expand All @@ -42,13 +25,78 @@ export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
. "$HOME/.cargo/env"
EOF

source /root/.bashrc

# echo "Pre-compile code to speed up first deployment."
git clone https://github.com/DataDog/serverless-sample-app.git /serverless-sample-app
cd /serverless-sample-app

mkdir -p build-logs

pushd src/shared-infra
npm i
popd

pushd src/inventory-service
echo "Building inventory service..."
mvn clean package -DskipTests
popd

pushd src/user-management-service
echo "Building user management service..."
npm i
./package.sh
popd

pushd src/loyalty-point-service
echo "Building loyalty point service..."
npm i
./package.sh
popd

pushd src/pricing-service
echo "Building pricing service..."
npm i
./package.sh
popd

pushd src/order-service
echo "Building order service..."
dotnet restore
popd

pushd src/order-service/src/Orders.BackgroundWorkers
echo "Building order background workers..."
dotnet lambda package
popd

pushd src/product-management-service
echo "Building product management service..."
make build
popd

pushd src/activity-service
echo "Building activity service..."
make dev && make deps && make build
popd

# #############################################################
# ### Install frontend and loadtesting dependencies ###
# #############################################################

pushd /serverless-sample-app/src/frontend
npm i
popd

pushd /serverless-sample-app/loadtest
npm i
popd

# Print app version information
# node --version
# dotnet --version
Expand Down
14 changes: 11 additions & 3 deletions build-image/success-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ echo "Installing AWS CDK"
npm install -g aws-cdk
cdk --help

echo "Installing .NET"
apt install -y dotnet-sdk-8.0
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
apt-get update

# echo "Installing .NET"
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
chmod +x ./dotnet-install.sh
./dotnet-install.sh --channel 9.0

export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
dotnet --version

dotnet new install Amazon.Lambda.Templates
dotnet tool install -g Amazon.Lambda.Tools

Expand Down
2 changes: 1 addition & 1 deletion loadtest/loadsimulator-low.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ scenarios:
as: adminJwt
- function: generateProductName
- post:
url: "{{ $processEnvironment.INVENTORY_API_ENDPOINT }}/product"
url: "{{ $processEnvironment.PRODUCT_API_ENDPOINT }}/product"
ifTrue: 'ProductName'
headers:
Content-Type: "application/json"
Expand Down
2 changes: 1 addition & 1 deletion loadtest/loadsimulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ scenarios:
as: adminJwt
- function: generateProductName
- post:
url: "{{ $processEnvironment.INVENTORY_API_ENDPOINT }}/product"
url: "{{ $processEnvironment.PRODUCT_API_ENDPOINT }}/product"
ifTrue: 'ProductName'
headers:
Content-Type: "application/json"
Expand Down
2 changes: 1 addition & 1 deletion loadtest/loadsimulator_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ scenarios:
as: adminJwt
- function: generateProductName
- post:
url: "{{ $processEnvironment.INVENTORY_API_ENDPOINT }}/product"
url: "{{ $processEnvironment.PRODUCT_API_ENDPOINT }}/product"
ifTrue: 'ProductName'
headers:
Content-Type: "application/json"
Expand Down
Loading
Loading