-
Notifications
You must be signed in to change notification settings - Fork 23
[Java] Custom Metrics E2E Test #479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| ## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| ## SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # This is a reusable workflow for running the Enablement test for App Signals. | ||
| # It is meant to be called from another workflow. | ||
| # Read more about reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview | ||
| name: Test | ||
| on: | ||
| push: | ||
| branches: | ||
| - Java_Custom_metrics | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
|
|
||
| jobs: | ||
| java-ec2-default: | ||
| uses: ./.github/workflows/java-ec2-default-test.yml | ||
| secrets: inherit | ||
| with: | ||
| caller-workflow-name: 'test' | ||
| aws-region: 'us-east-1' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,18 +135,22 @@ resource "null_resource" "main_service_setup" { | |
| ${var.get_adot_jar_command} | ||
|
|
||
| # Get and run the sample application with configuration | ||
| aws s3 cp ${var.sample_app_jar} ./main-service.jar | ||
| aws s3 cp ${var.sample_app_jar} ./main-service-delete-me.jar | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Undo |
||
|
|
||
| JAVA_TOOL_OPTIONS=' -javaagent:/home/ec2-user/adot.jar' \ | ||
| OTEL_METRICS_EXPORTER=none \ | ||
| OTEL_METRICS_EXPORTER=otlp \ | ||
| OTEL_LOGS_EXPORT=none \ | ||
| OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true \ | ||
| 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},Internal_Org=Financial,Business Unit=Payments,Region=us-east-1,aws.application_signals.metric_resource_keys=Business Unit&Region&Organization" \ | ||
| SERVICE_NAME='sample-application-${var.test_id}' | ||
| DEPLOYMENT_ENVIRONMENT_NAME='ec2:default' | ||
| OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://localhost:4318/v1/metrics \ | ||
| OTEL_RESOURCE_ATTRIBUTES="service.name=$${SERVICE_NAME},deployment.environment.name=$${DEPLOYMENT_ENVIRONMENT_NAME},Internal_Org=Financial,Business Unit=Payments,Region=us-east-1,aws.application_signals.metric_resource_keys=Business Unit&Region&Organization" \ | ||
| AWS_REGION='${var.aws_region}' \ | ||
| OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED=true \ | ||
| nohup java -XX:+UseG1GC -jar main-service.jar &> nohup.out & | ||
| nohup java -XX:+UseG1GC -jar main-service-delete-me.jar &> nohup.out & | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Undo |
||
|
|
||
| # The application needs time to come up and reach a steady state, this should not take longer than 30 seconds | ||
| sleep 30 | ||
|
|
@@ -233,7 +237,7 @@ resource "null_resource" "remote_service_setup" { | |
| ${var.get_adot_jar_command} | ||
|
|
||
| # Get and run the sample application with configuration | ||
| aws s3 cp ${var.sample_remote_app_jar} ./remote-service.jar | ||
| aws s3 cp ${var.sample_remote_app_jar} ./remote-service-delete-me.jar | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Undo |
||
|
|
||
| JAVA_TOOL_OPTIONS=' -javaagent:/home/ec2-user/adot.jar' \ | ||
| OTEL_METRICS_EXPORTER=none \ | ||
|
|
@@ -244,7 +248,7 @@ resource "null_resource" "remote_service_setup" { | |
| OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4316/v1/traces \ | ||
| OTEL_RESOURCE_ATTRIBUTES=service.name=sample-remote-application-${var.test_id} \ | ||
| OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED=true \ | ||
| nohup java -XX:+UseG1GC -jar remote-service.jar &> nohup.out & | ||
| nohup java -XX:+UseG1GC -jar remote-service-delete-me.jar &> nohup.out & | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Undo |
||
|
|
||
| # The application needs time to come up and reach a steady state, this should not take longer than 30 seconds | ||
| sleep 30 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove