generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 24
[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
Open
Miqueasher
wants to merge
18
commits into
main
Choose a base branch
from
Java_Custom_metrics
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+584
−73
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0392d07
Testing Java custom metrics
Miqueasher 2928537
fixing pr changes
Miqueasher feaa11a
addressing pr comments
Miqueasher 276b77a
Making pipeline conditional, JAR has NOT been created or uploaded
Miqueasher ff40e36
Java ec2-default test 1
Miqueasher 9b8b0f3
updating default-test to look for custom metrics
Miqueasher 93b32c6
testing env vars
Miqueasher fac5d69
java-ec2-default test 2
Miqueasher 0d7e9f4
java-ec2-default test 3
Miqueasher 27f360e
java-ec2-default test 4
Miqueasher f4a6aa0
testing env variables
Miqueasher 0906587
testing env variables
Miqueasher 6278cb5
testing env var
Miqueasher 7b6c353
swapping asg & ec2-default test validations
Miqueasher 7b27bf9
updating shell expansion
Miqueasher e045d33
updating custom-metric validation template
Miqueasher db755ab
updating variable export
Miqueasher b95d990
updating env. variables
Miqueasher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,18 +135,24 @@ 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 |
||
|
|
||
| export SERVICE_NAME='sample-application-${var.test_id}' | ||
| export DEPLOYMENT_ENVIRONMENT_NAME='ec2:default' | ||
|
|
||
| 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" \ | ||
| OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://localhost:4318/v1/metrics \ | ||
| OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED=true \ | ||
| nohup java -XX:+UseG1GC -jar main-service.jar &> nohup.out & | ||
| SERVICE_NAME='sample-application-${var.test_id}' \ | ||
| DEPLOYMENT_ENVIRONMENT_NAME='ec2:default' \ | ||
| OTEL_RESOURCE_ATTRIBUTES="service.name=$${SERVICE_NAME},deployment.environment.name=$${DEPLOYMENT_ENVIRONMENT_NAME},aws.application_signals.metric_resource_keys=all_attributes" \ | ||
| AWS_REGION='${var.aws_region}' \ | ||
| nohup java -Dotel.java.global-autoconfigure.enabled=true -XX:+UseG1GC -jar main-service-delete-me.jar &> nohup.out & | ||
|
|
||
| # The application needs time to come up and reach a steady state, this should not take longer than 30 seconds | ||
| sleep 30 | ||
|
|
@@ -233,7 +239,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 +250,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 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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