Skip to content

Commit 203540c

Browse files
committed
Add E2E test cases for runtime
1 parent 308a522 commit 203540c

32 files changed

+105
-62
lines changed

terraform/java/ec2/asg/main.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ resource "aws_launch_configuration" "launch_configuration" {
109109
sudo yum install java-${var.language_version}-amazon-corretto -y
110110
fi
111111
112+
# enable ec2 instance connect for debug
113+
sudo yum install ec2-instance-connect -y
114+
112115
# Copy in CW Agent configuration
113116
agent_config='${replace(replace(file("./amazon-cloudwatch-agent.json"), "/\\s+/", ""), "$REGION", var.aws_region)}'
114117
echo $agent_config > amazon-cloudwatch-agent.json
@@ -128,12 +131,11 @@ resource "aws_launch_configuration" "launch_configuration" {
128131
OTEL_METRICS_EXPORTER=none \
129132
OTEL_LOGS_EXPORT=none \
130133
OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true \
131-
OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED=false \
132134
OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4316/v1/metrics \
133135
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf \
134136
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4316/v1/traces \
135137
OTEL_RESOURCE_ATTRIBUTES=service.name=sample-application-${var.test_id} \
136-
nohup java -jar main-service.jar &> nohup.out &
138+
nohup java -jar -XX:+UseG1GC main-service.jar &> nohup.out &
137139
138140
# The application needs time to come up and reach a steady state, this should not take longer than 30 seconds
139141
sleep 30
@@ -230,12 +232,11 @@ resource "null_resource" "remote_service_setup" {
230232
OTEL_METRICS_EXPORTER=none \
231233
OTEL_LOGS_EXPORT=none \
232234
OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true \
233-
OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED=false \
234235
OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4316/v1/metrics \
235236
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf \
236237
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4316/v1/traces \
237238
OTEL_RESOURCE_ATTRIBUTES=service.name=sample-remote-application-${var.test_id} \
238-
nohup java -jar remote-service.jar &> nohup.out &
239+
nohup java -XX:+UseG1GC -jar remote-service.jar &> nohup.out &
239240
240241
# The application needs time to come up and reach a steady state, this should not take longer than 30 seconds
241242
sleep 30

terraform/java/ec2/default/main.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,11 @@ resource "null_resource" "main_service_setup" {
141141
OTEL_METRICS_EXPORTER=none \
142142
OTEL_LOGS_EXPORT=none \
143143
OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true \
144-
OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED=false \
145144
OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4316/v1/metrics \
146145
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf \
147146
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4316/v1/traces \
148147
OTEL_RESOURCE_ATTRIBUTES=service.name=sample-application-${var.test_id} \
149-
nohup java -jar main-service.jar &> nohup.out &
148+
nohup java -XX:+UseG1GC -jar main-service.jar &> nohup.out &
150149
151150
# The application needs time to come up and reach a steady state, this should not take longer than 30 seconds
152151
sleep 30
@@ -217,6 +216,9 @@ resource "null_resource" "remote_service_setup" {
217216
sudo yum install java-${var.language_version}-amazon-corretto -y
218217
fi
219218
219+
# enable ec2 instance connect for debug
220+
sudo yum install ec2-instance-connect -y
221+
220222
# Copy in CW Agent configuration
221223
agent_config='${replace(replace(file("./amazon-cloudwatch-agent.json"), "/\\s+/", ""), "$REGION", var.aws_region)}'
222224
echo $agent_config > amazon-cloudwatch-agent.json
@@ -236,12 +238,11 @@ resource "null_resource" "remote_service_setup" {
236238
OTEL_METRICS_EXPORTER=none \
237239
OTEL_LOGS_EXPORT=none \
238240
OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true \
239-
OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED=false \
240241
OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4316/v1/metrics \
241242
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf \
242243
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4316/v1/traces \
243244
OTEL_RESOURCE_ATTRIBUTES=service.name=sample-remote-application-${var.test_id} \
244-
nohup java -jar remote-service.jar &> nohup.out &
245+
nohup java -XX:+UseG1GC -jar remote-service.jar &> nohup.out &
245246
246247
# The application needs time to come up and reach a steady state, this should not take longer than 30 seconds
247248
sleep 30

terraform/java/ecs/resources/main-service.json.tpl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
"name": "OTEL_AWS_APPLICATION_SIGNALS_ENABLED",
2323
"value": "true"
2424
},
25-
{
26-
"name": "OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED",
27-
"value": "false"
28-
},
2925
{
3026
"name": "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT",
3127
"value": "http://localhost:4316/v1/metrics"

terraform/java/eks/main.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,6 @@ resource "kubernetes_deployment" "sample_app_deployment" {
123123
name = "RDS_MYSQL_CLUSTER_PASSWORD"
124124
value = var.rds_mysql_cluster_password
125125
}
126-
env {
127-
name = "OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED"
128-
value = "false"
129-
}
130126
port {
131127
container_port = 8080
132128
}
@@ -195,10 +191,6 @@ resource "kubernetes_deployment" "sample_remote_app_deployment" {
195191
port {
196192
container_port = 8080
197193
}
198-
env {
199-
name = "OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED"
200-
value = "false"
201-
}
202194
}
203195
}
204196
}

terraform/java/k8s/deploy/resources/frontend-service-depl.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,5 @@ spec:
2424
env:
2525
- name: "OTEL_SERVICE_NAME"
2626
value: "sample-application-${TESTING_ID}"
27-
- name: "OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED"
28-
value: "false"
2927
imagePullSecrets:
3028
- name: ecr-secret

terraform/java/k8s/deploy/resources/remote-service-depl.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,5 @@ spec:
2121
image: ${IMAGE}
2222
ports:
2323
- containerPort: 8081
24-
env:
25-
- name: OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED
26-
value: "false"
2724
imagePullSecrets:
2825
- name: ecr-secret

terraform/python/ec2/asg/main.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ resource "aws_launch_configuration" "launch_configuration" {
160160
export OTEL_METRICS_EXPORTER=none
161161
export OTEL_TRACES_EXPORTER=otlp
162162
export OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true
163-
export OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED=false
164163
export OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4315
165164
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4315
166165
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc
@@ -295,7 +294,6 @@ resource "null_resource" "remote_service_setup" {
295294
export OTEL_METRICS_EXPORTER=none
296295
export OTEL_TRACES_EXPORTER=otlp
297296
export OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true
298-
export OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED=false
299297
export OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4315
300298
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4315
301299
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc

terraform/python/ec2/default/main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ resource "null_resource" "main_service_setup" {
141141
sudo dnf install -y python${var.language_version}-pip
142142
fi
143143
144+
# enable ec2 instance connect for debug
145+
sudo yum install ec2-instance-connect -y
146+
144147
# Copy in CW Agent configuration
145148
agent_config='${replace(replace(file("./amazon-cloudwatch-agent.json"), "/\\s+/", ""), "$REGION", var.aws_region)}'
146149
echo $agent_config > amazon-cloudwatch-agent.json
@@ -170,7 +173,6 @@ resource "null_resource" "main_service_setup" {
170173
export OTEL_METRICS_EXPORTER=none
171174
export OTEL_TRACES_EXPORTER=otlp
172175
export OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true
173-
export OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED=false
174176
export OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4315
175177
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4315
176178
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc
@@ -269,6 +271,9 @@ resource "null_resource" "remote_service_setup" {
269271
sudo dnf install -y python${var.language_version}-pip
270272
fi
271273
274+
# enable ec2 instance connect for debug
275+
sudo yum install ec2-instance-connect -y
276+
272277
# Copy in CW Agent configuration
273278
agent_config='${replace(replace(file("./amazon-cloudwatch-agent.json"), "/\\s+/", ""), "$REGION", var.aws_region)}'
274279
echo $agent_config > amazon-cloudwatch-agent.json
@@ -298,7 +303,6 @@ resource "null_resource" "remote_service_setup" {
298303
export OTEL_METRICS_EXPORTER=none
299304
export OTEL_TRACES_EXPORTER=otlp
300305
export OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true
301-
export OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED=false
302306
export OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4315
303307
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4315
304308
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc

terraform/python/ecs/resources/main-service.json.tpl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@
5959
"name": "OTEL_AWS_APPLICATION_SIGNALS_ENABLED",
6060
"value": "true"
6161
},
62-
{
63-
"name": "OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED",
64-
"value": "false"
65-
},
6662
{
6763
"name": "OTEL_RESOURCE_ATTRIBUTES",
6864
"value": "service.name=${app_service_name}"

terraform/python/eks/main.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,6 @@ resource "kubernetes_deployment" "python_app_deployment" {
135135
name = "RDS_MYSQL_CLUSTER_PASSWORD"
136136
value = var.rds_mysql_cluster_password
137137
}
138-
env {
139-
name = "OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED"
140-
value = "false"
141-
}
142138
port {
143139
container_port = 8000
144140
}
@@ -209,10 +205,6 @@ resource "kubernetes_deployment" "python_r_app_deployment" {
209205
name = "DJANGO_SETTINGS_MODULE"
210206
value = "django_remote_service.settings"
211207
}
212-
env {
213-
name = "OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED"
214-
value = "false"
215-
}
216208
port {
217209
container_port = 8001
218210
}

0 commit comments

Comments
 (0)