Skip to content

Commit

Permalink
[chore] Fix sample app script files and arns used in the canaries (#1037
Browse files Browse the repository at this point in the history
)

* fix sample app tf files and arns

* Nodejs version 18 in workflow

* Fix nodejs sample app  layer arns
  • Loading branch information
vasireddy99 authored Jan 6, 2025
1 parent 532d74c commit f536de5
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
- uses: actions/setup-node@v4
if: ${{ matrix.language == 'nodejs' }}
with:
node-version: '16'
node-version: '18'
- name: Cache (NodeJS)
uses: actions/cache@v4
if: ${{ matrix.language == 'nodejs' }}
Expand Down
4 changes: 2 additions & 2 deletions java/sample-apps/aws-sdk/deploy/agent/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ receivers:
http:
exporters:
logging:
debug:
awsxray:
prometheusremotewrite:
endpoint: "${aws_prometheus_workspace.test_amp_workspace[0].prometheus_endpoint}api/v1/remote_write"
Expand All @@ -68,7 +68,7 @@ service:
exporters: [awsxray]
metrics:
receivers: [otlp]
exporters: [logging, prometheusremotewrite]
exporters: [debug, prometheusremotewrite]
EOT
filename = "config.yaml"
}
Expand Down
32 changes: 16 additions & 16 deletions nodejs/sample-apps/aws-sdk/deploy/wrapper/layer_amd64.tf
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
locals {
sdk_layer_arns_amd64 = {
"ap-northeast-1" = "arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"ap-northeast-2" = "arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"ap-south-1" = "arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"ap-southeast-1" = "arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"ap-southeast-2" = "arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"ca-central-1" = "arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"eu-central-1" = "arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"eu-north-1" = "arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"eu-west-1" = "arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"eu-west-2" = "arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"eu-west-3" = "arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"sa-east-1" = "arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"us-east-1" = "arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"us-east-2" = "arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"us-west-1" = "arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"us-west-2" = "arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-0:1"
"ap-northeast-1" = "arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"ap-northeast-2" = "arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"ap-south-1" = "arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"ap-southeast-1" = "arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"ap-southeast-2" = "arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"ca-central-1" = "arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"eu-central-1" = "arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"eu-north-1" = "arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"eu-west-1" = "arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"eu-west-2" = "arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"eu-west-3" = "arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"sa-east-1" = "arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"us-east-1" = "arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"us-east-2" = "arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"us-west-1" = "arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
"us-west-2" = "arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-30-1:1"
}
}
32 changes: 16 additions & 16 deletions nodejs/sample-apps/aws-sdk/deploy/wrapper/layer_arm64.tf
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
locals {
sdk_layer_arns_arm64 = {
"ap-northeast-1" = "arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"ap-northeast-2" = "arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"ap-south-1" = "arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"ap-southeast-1" = "arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"ap-southeast-2" = "arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"ca-central-1" = "arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"eu-central-1" = "arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"eu-north-1" = "arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"eu-west-1" = "arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"eu-west-2" = "arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"eu-west-3" = "arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"sa-east-1" = "arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"us-east-1" = "arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"us-east-2" = "arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"us-west-1" = "arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"us-west-2" = "arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-0:1"
"ap-northeast-1" = "arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"ap-northeast-2" = "arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"ap-south-1" = "arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"ap-southeast-1" = "arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"ap-southeast-2" = "arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"ca-central-1" = "arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"eu-central-1" = "arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"eu-north-1" = "arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"eu-west-1" = "arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"eu-west-2" = "arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"eu-west-3" = "arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"sa-east-1" = "arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"us-east-1" = "arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"us-east-2" = "arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"us-west-1" = "arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
"us-west-2" = "arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-30-1:1"
}
}
1 change: 1 addition & 0 deletions nodejs/sample-apps/aws-sdk/deploy/wrapper/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module "app" {
collector_layer_arn = null
sdk_layer_arn = local.architecture_to_arns_mapping[var.architecture][data.aws_region.current.name]
tracing_mode = "Active"
runtime = var.runtime
architecture = var.architecture
}

Expand Down
6 changes: 6 additions & 0 deletions nodejs/sample-apps/aws-sdk/deploy/wrapper/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ variable "architecture" {
description = "Lambda function architecture, either arm64 or x86_64"
default = "x86_64"
}

variable "runtime" {
type = string
description = "NodeJS runtime version used for sample Lambda Function"
default = "nodejs18.x"
}

0 comments on commit f536de5

Please sign in to comment.