Skip to content

Commit 1b380ea

Browse files
committed
Future fix for EKS and K8S.
1 parent 18b2170 commit 1b380ea

File tree

7 files changed

+15
-2
lines changed

7 files changed

+15
-2
lines changed

terraform/java/ec2/asg/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ resource "null_resource" "remote_service_setup" {
237237
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf \
238238
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4316/v1/traces \
239239
OTEL_RESOURCE_ATTRIBUTES=service.name=sample-remote-application-${var.test_id} \
240+
OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED=true \
240241
nohup java -XX:+UseG1GC -jar remote-service.jar &> nohup.out &
241242
242243
# The application needs time to come up and reach a steady state, this should not take longer than 30 seconds

terraform/java/ec2/default/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ resource "null_resource" "remote_service_setup" {
243243
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf \
244244
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4316/v1/traces \
245245
OTEL_RESOURCE_ATTRIBUTES=service.name=sample-remote-application-${var.test_id} \
246+
OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED=true \
246247
nohup java -XX:+UseG1GC -jar remote-service.jar &> nohup.out &
247248
248249
# The application needs time to come up and reach a steady state, this should not take longer than 30 seconds

terraform/java/eks-otlp-ocb/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ resource "kubernetes_deployment" "sample_remote_app_deployment" {
191191
name = "OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED"
192192
value = "false"
193193
}
194+
env {
195+
name = "OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED"
196+
value = "true"
197+
}
194198
}
195199
}
196200
}

terraform/java/eks/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ resource "kubernetes_deployment" "sample_remote_app_deployment" {
192192
name = "back-end"
193193
image = var.sample_remote_app_image
194194
image_pull_policy = "Always"
195+
env {
196+
name = "OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED"
197+
value = "true"
198+
}
195199
port {
196200
container_port = 8080
197201
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,8 @@ spec:
2222
imagePullPolicy: Always
2323
ports:
2424
- containerPort: 8081
25+
env:
26+
- name: "OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED"
27+
value: "true"
2528
imagePullSecrets:
2629
- name: ecr-secret

validator/src/main/resources/expected-data-template/java/eks/aws-sdk-call-trace.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "^{{serviceName}}$",
33
"http": {
44
"request": {
5-
"url": "^{{endpoint}}/remote-service(?:\\?ip=(([0-9]{1,3}\\.){3}[0-9]{1,3})&testingId={{testingId}})?$",
5+
"url": "^{{endpoint}}/aws-sdk-call(?:\\?ip=(([0-9]{1,3}\\.){3}[0-9]{1,3})&testingId={{testingId}})?$",
66
"method": "^GET$"
77
},
88
"response": {

validator/src/main/resources/expected-data-template/java/k8s/aws-sdk-call-trace.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "^{{serviceName}}$",
33
"http": {
44
"request": {
5-
"url": "^{{endpoint}}/remote-service(?:\\?ip=(([0-9]{1,3}\\.){3}[0-9]{1,3})&testingId={{testingId}})?$",
5+
"url": "^{{endpoint}}/aws-sdk-call(?:\\?ip=(([0-9]{1,3}\\.){3}[0-9]{1,3})&testingId={{testingId}})?$",
66
"method": "^GET$"
77
},
88
"response": {

0 commit comments

Comments
 (0)