Skip to content

Commit

Permalink
Update trace validator.
Browse files Browse the repository at this point in the history
  • Loading branch information
zzhlogin committed Dec 17, 2024
1 parent 1a05590 commit 18b2170
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 10 deletions.
1 change: 1 addition & 0 deletions terraform/java/ec2/asg/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ resource "aws_launch_configuration" "launch_configuration" {
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf \
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4316/v1/traces \
OTEL_RESOURCE_ATTRIBUTES=service.name=sample-application-${var.test_id} \
OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED=true \
nohup java -jar -XX:+UseG1GC main-service.jar &> nohup.out &
# The application needs time to come up and reach a steady state, this should not take longer than 30 seconds
Expand Down
6 changes: 5 additions & 1 deletion terraform/java/ecs/resources/main-service.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@
{
"name": "OTEL_PROPAGATORS",
"value": "tracecontext,baggage,b3,xray"
}
},
{
"name": "OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED",
"value": "true"
}
],
"mountPoints": [
{
Expand Down
4 changes: 4 additions & 0 deletions terraform/java/eks-otlp-ocb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ resource "kubernetes_deployment" "sample_app_deployment" {
name = "OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED"
value = "false"
}
env {
name = "OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED"
value = "true"
}
port {
container_port = 8080
}
Expand Down
4 changes: 4 additions & 0 deletions terraform/java/eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ resource "kubernetes_deployment" "sample_app_deployment" {
name = "RDS_MYSQL_CLUSTER_PASSWORD"
value = var.rds_mysql_cluster_password
}
env {
name = "OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED"
value = "true"
}
port {
container_port = 8080
}
Expand Down
2 changes: 1 addition & 1 deletion terraform/java/k8s/deploy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ resource "null_resource" "deploy" {
kubectl delete pods --all -n amazon-cloudwatch
sleep 10
kubectl wait --for=condition=Ready pod --all -n amazon-cloudwatch
elif [ "${var.repository}" = "aws-otel-java-instrumentation" ]; then
elif [ "${var.repository}" = "aws-application-signals-test-framework" ]; then
kubectl patch deploy -n amazon-cloudwatch amazon-cloudwatch-observability-controller-manager --type='json' \
-p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args/0", "value": "--auto-instrumentation-java-image=${var.patch_image_arn}"}]'
kubectl delete pods --all -n amazon-cloudwatch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ spec:
env:
- name: "OTEL_SERVICE_NAME"
value: "sample-application-${TESTING_ID}"
- name: "OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED"
value: "true"
imagePullSecrets:
- name: ecr-secret
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "^{{serviceName}}$",
"http": {
"request": {
"url": "^{{endpoint}}/aws-sdk-call\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})&testingId={{testingId}}$",
"url": "^{{endpoint}}/aws-sdk-call(?:\\?ip=(([0-9]{1,3}\\.){3}[0-9]{1,3})&testingId={{testingId}})?$",
"method": "^GET$"
},
"response": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "^{{serviceName}}$",
"http": {
"request": {
"url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})&testingId={{testingId}}$",
"url": "^{{endpoint}}/remote-service(?:\\?ip=(([0-9]{1,3}\\.){3}[0-9]{1,3})&testingId={{testingId}})?$",
"method": "^GET$"
},
"response": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "^{{serviceName}}$",
"http": {
"request": {
"url": "^{{endpoint}}/aws-sdk-call\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})&testingId={{testingId}}$",
"url": "^{{endpoint}}/aws-sdk-call(?:\\?ip=(([0-9]{1,3}\\.){3}[0-9]{1,3})&testingId={{testingId}})?$",
"method": "^GET$"
},
"response": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "^{{serviceName}}$",
"http": {
"request": {
"url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})&testingId={{testingId}}$",
"url": "^{{endpoint}}/remote-service(?:\\?ip=(([0-9]{1,3}\\.){3}[0-9]{1,3})&testingId={{testingId}})?$",
"method": "^GET$"
},
"response": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "^{{serviceName}}$",
"http": {
"request": {
"url": "^{{endpoint}}/aws-sdk-call\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})&testingId={{testingId}}$",
"url": "^{{endpoint}}/remote-service(?:\\?ip=(([0-9]{1,3}\\.){3}[0-9]{1,3})&testingId={{testingId}})?$",
"method": "^GET$"
},
"response": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "^{{serviceName}}$",
"http": {
"request": {
"url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})&testingId={{testingId}}$",
"url": "^{{endpoint}}/remote-service(?:\\?ip=(([0-9]{1,3}\\.){3}[0-9]{1,3})&testingId={{testingId}})?$",
"method": "^GET$"
},
"response": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "^{{serviceName}}$",
"http": {
"request": {
"url": "^{{endpoint}}/aws-sdk-call\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})&testingId={{testingId}}$",
"url": "^{{endpoint}}/remote-service(?:\\?ip=(([0-9]{1,3}\\.){3}[0-9]{1,3})&testingId={{testingId}})?$",
"method": "^GET$"
},
"response": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "^{{serviceName}}$",
"http": {
"request": {
"url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})&testingId={{testingId}}$",
"url": "^{{endpoint}}/remote-service(?:\\?ip=(([0-9]{1,3}\\.){3}[0-9]{1,3})&testingId={{testingId}})?$",
"method": "^GET$"
},
"response": {
Expand Down

0 comments on commit 18b2170

Please sign in to comment.