diff --git a/terraform/java/ec2/asg/main.tf b/terraform/java/ec2/asg/main.tf index b5c702f68..bd4df1d27 100644 --- a/terraform/java/ec2/asg/main.tf +++ b/terraform/java/ec2/asg/main.tf @@ -134,7 +134,7 @@ resource "aws_launch_configuration" "launch_configuration" { OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4316/v1/metrics \ 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_RESOURCE_ATTRIBUTES=service.name=sample-application-${var.test_id},aws.application_signals.metric_resource_keys=all_attributes \ OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED=true \ nohup java -jar -XX:+UseG1GC main-service.jar &> nohup.out & diff --git a/terraform/java/ec2/default/main.tf b/terraform/java/ec2/default/main.tf index 8dfb6905a..3ef773a08 100644 --- a/terraform/java/ec2/default/main.tf +++ b/terraform/java/ec2/default/main.tf @@ -144,7 +144,7 @@ resource "null_resource" "main_service_setup" { OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4316/v1/metrics \ 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_RESOURCE_ATTRIBUTES="service.name=sample-application-${var.test_id},Internal_Org=Financial,Business Unit=Payments,Region=us-east-1,aws.application_signals.metric_resource_keys=Business Unit&Region&Organization" \ OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED=true \ nohup java -XX:+UseG1GC -jar main-service.jar &> nohup.out & diff --git a/validator/src/main/resources/expected-data-template/java/ec2/asg/aws-sdk-call-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/asg/aws-sdk-call-log.mustache index f4e5ae865..e186cafc4 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/asg/aws-sdk-call-log.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/asg/aws-sdk-call-log.mustache @@ -6,7 +6,10 @@ "Operation": "GET /aws-sdk-call", "Version": "^1$", "Telemetry.Source": "^LocalRootSpan$", - "Host": "^{{privateDnsName}}$" + "Host": "^{{privateDnsName}}$", + "otel.resource.aws.application_signals.metric_resource_keys": "all_attributes", + "otel.resource.host.image.id": "^{{instanceAmi}}$", + "otel.resource.host.type": "^([a-z0-9]+\\.[a-z0-9]+)$" }, { "EC2.AutoScalingGroup": "^{{platformInfo}}$", @@ -20,5 +23,8 @@ "RemoteResourceIdentifier": "^e2e-test-bucket-name-{{testingId}}$", "RemoteResourceType": "^AWS::S3::Bucket$", "Telemetry.Source": "^ClientSpan$", - "Host": "^{{privateDnsName}}$" + "Host": "^{{privateDnsName}}$", + "otel.resource.aws.application_signals.metric_resource_keys": "all_attributes", + "otel.resource.host.image.id": "^{{instanceAmi}}$", + "otel.resource.host.type": "^([a-z0-9]+\\.[a-z0-9]+)$" }] \ No newline at end of file diff --git a/validator/src/main/resources/expected-data-template/java/ec2/asg/aws-sdk-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/asg/aws-sdk-call-trace.mustache index 58e4b33d9..f785c8c53 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/asg/aws-sdk-call-trace.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/asg/aws-sdk-call-trace.mustache @@ -21,6 +21,7 @@ "default": { "EC2.AutoScalingGroup": "^{{platformInfo}}$", "EC2.InstanceId": "^{{instanceId}}$", + "otel.resource.aws.application_signals.metric_resource_keys": "all_attributes", "otel.resource.ec2.tag.aws:autoscaling:groupName": "^{{platformInfo}}$", "otel.resource.host.id": "^{{instanceId}}$", "otel.resource.host.image.id": "^{{instanceAmi}}$", diff --git a/validator/src/main/resources/expected-data-template/java/ec2/asg/client-call-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/asg/client-call-log.mustache index 4dbd3d3ce..faf8d0aba 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/asg/client-call-log.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/asg/client-call-log.mustache @@ -6,7 +6,10 @@ "Operation": "InternalOperation", "Version": "^1$", "Telemetry.Source": "^LocalRootSpan$", - "Host": "^{{privateDnsName}}$" + "Host": "^{{privateDnsName}}$", + "otel.resource.aws.application_signals.metric_resource_keys": "all_attributes", + "otel.resource.host.image.id": "^{{instanceAmi}}$", + "otel.resource.host.type": "^([a-z0-9]+\\.[a-z0-9]+)$" }, { "EC2.AutoScalingGroup": "^{{platformInfo}}$", @@ -18,5 +21,8 @@ "RemoteService": "local-root-client-call", "RemoteOperation": "GET /", "Telemetry.Source": "^ClientSpan$", - "Host": "^{{privateDnsName}}$" + "Host": "^{{privateDnsName}}$", + "otel.resource.aws.application_signals.metric_resource_keys": "all_attributes", + "otel.resource.host.image.id": "^{{instanceAmi}}$", + "otel.resource.host.type": "^([a-z0-9]+\\.[a-z0-9]+)$" }] \ No newline at end of file diff --git a/validator/src/main/resources/expected-data-template/java/ec2/asg/client-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/asg/client-call-trace.mustache index 22bb4a955..696fbc20d 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/asg/client-call-trace.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/asg/client-call-trace.mustache @@ -7,6 +7,7 @@ }, "metadata": { "default": { + "otel.resource.aws.application_signals.metric_resource_keys": "all_attributes", "otel.resource.ec2.tag.aws:autoscaling:groupName": "^{{platformInfo}}$", "otel.resource.host.id": "^{{instanceId}}$", "otel.resource.host.image.id": "^{{instanceAmi}}$", diff --git a/validator/src/main/resources/expected-data-template/java/ec2/asg/outgoing-http-call-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/asg/outgoing-http-call-log.mustache index a13c8b103..5ebafc0e7 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/asg/outgoing-http-call-log.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/asg/outgoing-http-call-log.mustache @@ -6,7 +6,10 @@ "Operation": "GET /outgoing-http-call", "Version": "^1$", "Telemetry.Source": "^LocalRootSpan$", - "Host": "^{{privateDnsName}}$" + "Host": "^{{privateDnsName}}$", + "otel.resource.aws.application_signals.metric_resource_keys": "all_attributes", + "otel.resource.host.image.id": "^{{instanceAmi}}$", + "otel.resource.host.type": "^([a-z0-9]+\\.[a-z0-9]+)$" }, { "EC2.AutoScalingGroup": "^{{platformInfo}}$", @@ -18,5 +21,8 @@ "RemoteService": "www.amazon.com", "RemoteOperation": "GET /", "Telemetry.Source": "^ClientSpan$", - "Host": "^{{privateDnsName}}$" + "Host": "^{{privateDnsName}}$", + "otel.resource.aws.application_signals.metric_resource_keys": "all_attributes", + "otel.resource.host.image.id": "^{{instanceAmi}}$", + "otel.resource.host.type": "^([a-z0-9]+\\.[a-z0-9]+)$" }] \ No newline at end of file diff --git a/validator/src/main/resources/expected-data-template/java/ec2/asg/outgoing-http-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/asg/outgoing-http-call-trace.mustache index 245f07920..041f6dddd 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/asg/outgoing-http-call-trace.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/asg/outgoing-http-call-trace.mustache @@ -21,6 +21,7 @@ "default": { "EC2.AutoScalingGroup": "^{{platformInfo}}$", "EC2.InstanceId": "^{{instanceId}}$", + "otel.resource.aws.application_signals.metric_resource_keys": "all_attributes", "otel.resource.ec2.tag.aws:autoscaling:groupName": "^{{platformInfo}}$", "otel.resource.host.id": "^{{instanceId}}$", "otel.resource.host.image.id": "^{{instanceAmi}}$", diff --git a/validator/src/main/resources/expected-data-template/java/ec2/asg/remote-service-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/asg/remote-service-log.mustache index 0527d8674..76a17990b 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/asg/remote-service-log.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/asg/remote-service-log.mustache @@ -6,7 +6,10 @@ "Operation": "GET /remote-service", "Version": "^1$", "Telemetry.Source": "^LocalRootSpan$", - "Host": "^{{privateDnsName}}$" + "Host": "^{{privateDnsName}}$", + "otel.resource.aws.application_signals.metric_resource_keys": "all_attributes", + "otel.resource.host.image.id": "^{{instanceAmi}}$", + "otel.resource.host.type": "^([a-z0-9]+\\.[a-z0-9]+)$" }, { "EC2.AutoScalingGroup": "^{{platformInfo}}$", @@ -18,5 +21,8 @@ "RemoteService": "{{remoteServiceDeploymentName}}", "RemoteOperation": "GET /healthcheck", "Telemetry.Source": "^ClientSpan$", - "Host": "^{{privateDnsName}}$" + "Host": "^{{privateDnsName}}$", + "otel.resource.aws.application_signals.metric_resource_keys": "all_attributes", + "otel.resource.host.image.id": "^{{instanceAmi}}$", + "otel.resource.host.type": "^([a-z0-9]+\\.[a-z0-9]+)$" }] \ No newline at end of file diff --git a/validator/src/main/resources/expected-data-template/java/ec2/asg/remote-service-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/asg/remote-service-trace.mustache index 32043f035..cfa07a1c7 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/asg/remote-service-trace.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/asg/remote-service-trace.mustache @@ -22,6 +22,7 @@ "EC2.AutoScalingGroup": "^{{platformInfo}}$", "EC2.InstanceId": "^{{instanceId}}$", "PlatformType": "^AWS::EC2$", + "otel.resource.aws.application_signals.metric_resource_keys": "all_attributes", "otel.resource.ec2.tag.aws:autoscaling:groupName": "^{{platformInfo}}$", "otel.resource.host.id": "^{{instanceId}}$", "otel.resource.host.image.id": "^{{instanceAmi}}$", diff --git a/validator/src/main/resources/expected-data-template/java/ec2/default/aws-sdk-call-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/default/aws-sdk-call-log.mustache index 5d820b066..946a63901 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/default/aws-sdk-call-log.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/default/aws-sdk-call-log.mustache @@ -5,7 +5,9 @@ "Operation": "GET /aws-sdk-call", "Version": "^1$", "Telemetry.Source": "^LocalRootSpan$", - "Host": "^ip(-[0-9]{1,3}){4}.*$" + "Host": "^ip(-[0-9]{1,3}){4}.*$", + "otel.resource.Business Unit": "Payments", + "otel.resource.Region": "us-east-1" }, { "EC2.InstanceId": "^{{instanceId}}$", @@ -18,5 +20,7 @@ "RemoteResourceIdentifier": "^e2e-test-bucket-name-{{testingId}}$", "RemoteResourceType": "^AWS::S3::Bucket$", "Telemetry.Source": "^ClientSpan$", - "Host": "^ip(-[0-9]{1,3}){4}.*$" + "Host": "^ip(-[0-9]{1,3}){4}.*$", + "otel.resource.Business Unit": "Payments", + "otel.resource.Region": "us-east-1" }] \ No newline at end of file diff --git a/validator/src/main/resources/expected-data-template/java/ec2/default/aws-sdk-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/default/aws-sdk-call-trace.mustache index 488ce397b..dbcffd91b 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/default/aws-sdk-call-trace.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/default/aws-sdk-call-trace.mustache @@ -21,6 +21,10 @@ "default": { "EC2.InstanceId": "^{{instanceId}}$", "PlatformType": "^AWS::EC2$", + "otel.resource.Internal_Org": "Financial", + "otel.resource.Business Unit": "Payments", + "otel.resource.Region": "us-east-1", + "otel.resource.aws.application_signals.metric_resource_keys": "Business Unit&Region&Organization", "otel.resource.host.image.id": "^{{instanceAmi}}$", "otel.resource.host.type": "^([a-z0-9]+\\.[a-z0-9]+)$", "aws.span.kind": "^LOCAL_ROOT$" diff --git a/validator/src/main/resources/expected-data-template/java/ec2/default/client-call-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/default/client-call-log.mustache index 25c72000a..8abc8e038 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/default/client-call-log.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/default/client-call-log.mustache @@ -5,7 +5,9 @@ "Operation": "InternalOperation", "Version": "^1$", "Telemetry.Source": "^LocalRootSpan$", - "Host": "^ip(-[0-9]{1,3}){4}.*$" + "Host": "^ip(-[0-9]{1,3}){4}.*$", + "otel.resource.Business Unit": "Payments", + "otel.resource.Region": "us-east-1" }, { "EC2.InstanceId": "^{{instanceId}}$", @@ -16,5 +18,7 @@ "RemoteService": "local-root-client-call", "RemoteOperation": "GET /", "Telemetry.Source": "^ClientSpan$", - "Host": "^ip(-[0-9]{1,3}){4}.*$" + "Host": "^ip(-[0-9]{1,3}){4}.*$", + "otel.resource.Business Unit": "Payments", + "otel.resource.Region": "us-east-1" }] \ No newline at end of file diff --git a/validator/src/main/resources/expected-data-template/java/ec2/default/client-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/default/client-call-trace.mustache index 5a7774e4b..c6fbfcd77 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/default/client-call-trace.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/default/client-call-trace.mustache @@ -7,6 +7,10 @@ }, "metadata": { "default": { + "otel.resource.Internal_Org": "Financial", + "otel.resource.Business Unit": "Payments", + "otel.resource.Region": "us-east-1", + "otel.resource.aws.application_signals.metric_resource_keys": "Business Unit&Region&Organization", "otel.resource.host.image.id": "^{{instanceAmi}}$", "otel.resource.host.type": "^([a-z0-9]+\\.[a-z0-9]+)$" } diff --git a/validator/src/main/resources/expected-data-template/java/ec2/default/outgoing-http-call-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/default/outgoing-http-call-log.mustache index 60c38935c..3765c1785 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/default/outgoing-http-call-log.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/default/outgoing-http-call-log.mustache @@ -5,7 +5,9 @@ "Operation": "GET /outgoing-http-call", "Version": "^1$", "Telemetry.Source": "^LocalRootSpan$", - "Host": "^ip(-[0-9]{1,3}){4}.*$" + "Host": "^ip(-[0-9]{1,3}){4}.*$", + "otel.resource.Business Unit": "Payments", + "otel.resource.Region": "us-east-1" }, { "EC2.InstanceId": "^{{instanceId}}$", @@ -16,6 +18,8 @@ "RemoteService": "www.amazon.com", "RemoteOperation": "GET /", "Telemetry.Source": "^ClientSpan$", - "Host": "^ip(-[0-9]{1,3}){4}.*$" + "Host": "^ip(-[0-9]{1,3}){4}.*$", + "otel.resource.Business Unit": "Payments", + "otel.resource.Region": "us-east-1" }] diff --git a/validator/src/main/resources/expected-data-template/java/ec2/default/outgoing-http-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/default/outgoing-http-call-trace.mustache index c1a91c841..80e5c5411 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/default/outgoing-http-call-trace.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/default/outgoing-http-call-trace.mustache @@ -21,6 +21,10 @@ "default": { "EC2.InstanceId": "^{{instanceId}}$", "PlatformType": "^AWS::EC2$", + "otel.resource.Internal_Org": "Financial", + "otel.resource.Business Unit": "Payments", + "otel.resource.Region": "us-east-1", + "otel.resource.aws.application_signals.metric_resource_keys": "Business Unit&Region&Organization", "otel.resource.host.image.id": "^{{instanceAmi}}$", "otel.resource.host.type": "^([a-z0-9]+\\.[a-z0-9]+)$", "aws.span.kind": "^LOCAL_ROOT$" diff --git a/validator/src/main/resources/expected-data-template/java/ec2/default/remote-service-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/default/remote-service-log.mustache index cd457dc7b..f042effc5 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/default/remote-service-log.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/default/remote-service-log.mustache @@ -5,7 +5,9 @@ "Operation": "GET /remote-service", "Version": "^1$", "Telemetry.Source": "^LocalRootSpan$", - "Host": "^ip(-[0-9]{1,3}){4}.*$" + "Host": "^ip(-[0-9]{1,3}){4}.*$", + "otel.resource.Business Unit": "Payments", + "otel.resource.Region": "us-east-1" }, { "EC2.InstanceId": "^{{instanceId}}$", @@ -16,5 +18,7 @@ "RemoteService": "{{remoteServiceDeploymentName}}", "RemoteOperation": "GET /healthcheck", "Telemetry.Source": "^ClientSpan$", - "Host": "^ip(-[0-9]{1,3}){4}.*$" + "Host": "^ip(-[0-9]{1,3}){4}.*$", + "otel.resource.Business Unit": "Payments", + "otel.resource.Region": "us-east-1" }] \ No newline at end of file diff --git a/validator/src/main/resources/expected-data-template/java/ec2/default/remote-service-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/default/remote-service-trace.mustache index 2ef1f4d74..51d7eec0c 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/default/remote-service-trace.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/default/remote-service-trace.mustache @@ -21,6 +21,10 @@ "default": { "EC2.InstanceId": "^{{instanceId}}$", "PlatformType": "^AWS::EC2$", + "otel.resource.Internal_Org": "Financial", + "otel.resource.Business Unit": "Payments", + "otel.resource.Region": "us-east-1", + "otel.resource.aws.application_signals.metric_resource_keys": "Business Unit&Region&Organization", "otel.resource.host.image.id": "^{{instanceAmi}}$", "otel.resource.host.type": "^([a-z0-9]+\\.[a-z0-9]+)$", "aws.span.kind": "^LOCAL_ROOT$"