Skip to content

Commit 75899be

Browse files
committed
testing pr changes
1 parent d817018 commit 75899be

File tree

6 files changed

+38
-15
lines changed

6 files changed

+38
-15
lines changed

.github/workflows/python-ec2-default-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ env:
4949
CPU_ARCHITECTURE: ${{ inputs.cpu-architecture }}
5050
ADOT_WHEEL_NAME: ${{ inputs.staging-wheel-name }}
5151
OTEL_SOURCE: ${{ inputs.otel-source }}
52-
SAMPLE_APP_ZIP: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}/python-sample-app.zip
52+
SAMPLE_APP_ZIP: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}/python-sample-app-delete-me.zip
5353
E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }}
5454
E2E_TEST_ROLE_NAME: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }}
5555
METRIC_NAMESPACE: ApplicationSignals
@@ -252,7 +252,7 @@ jobs:
252252
--instance-id ${{ env.MAIN_SERVICE_INSTANCE_ID }}
253253
--rollup'
254254

255-
# Creating a separate validation for custom metrics sent by CloudWatch Agent
255+
# Creating a separate validation for custom metrics
256256
- name: Validate custom metrics
257257
id: cwagent-metric-validation
258258
if: (success() || steps.log-validation.outcome == 'failure' || steps.metric-validation.outcome == 'failure') && !cancelled()

.github/workflows/python-sample-app-s3-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ jobs:
4848

4949
- name: Build Sample App Zip
5050
working-directory: sample-apps/python
51-
run: zip -r python-sample-app.zip .
51+
run: zip -r python-sample-app-delete-me.zip .
5252

5353
- name: Upload to S3
5454
working-directory: sample-apps/python
55-
run: aws s3api put-object --bucket ${{ secrets.APP_SIGNALS_E2E_EC2_JAR }}-prod-${{ matrix.aws-region }} --body ./python-sample-app.zip --key python-sample-app.zip
55+
run: aws s3api put-object --bucket ${{ secrets.APP_SIGNALS_E2E_EC2_JAR }}-prod-${{ matrix.aws-region }} --body ./python-sample-app-delete-me.zip --key python-sample-app-delete-me.zip
5656

5757
- name: Build Gen AI Sample App Zip
5858
working-directory: sample-apps/python/genai_service

.github/workflows/test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
## SPDX-License-Identifier: Apache-2.0
3+
4+
# This is a reusable workflow for running the Enablement test for App Signals.
5+
# It is meant to be called from another workflow.
6+
# Read more about reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview
7+
name: Test
8+
on:
9+
push:
10+
branches:
11+
- otel-custom-metrics-test
12+
13+
permissions:
14+
id-token: write
15+
contents: read
16+
17+
jobs:
18+
java-ec2-default:
19+
uses: ./.github/workflows/python-ec2-default-test.yml
20+
secrets: inherit
21+
with:
22+
caller-workflow-name: 'test'
23+
aws-region: 'us-east-1'

terraform/python/ec2/default/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# CLOUDWATCH AGENT CONFIG.
2-
This cloudwatch-agent.json file is a version of the amazon-cloudwatch-agent fitted to the needs of the python sample app using custom metrics.
2+
This cloudwatch-agent.json file is a version of the amazon-cloudwatch-agent fitted to the needs of the python sample app using custom metrics. Shown in public docs: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AppSignals-CustomMetrics.html#AppSignals-CustomMetrics-OpenTelemetry
33

44
It handles the custom metrics through the addition of the otlp ports:
55
"otlp": {

terraform/python/ec2/default/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ resource "null_resource" "main_service_setup" {
161161
${var.get_adot_wheel_command}
162162
163163
# Get and run the sample application with configuration
164-
aws s3 cp ${var.sample_app_zip} ./python-sample-app.zip
165-
unzip -o python-sample-app.zip
164+
aws s3 cp ${var.sample_app_zip} ./python-sample-app-delete-me.zip
165+
unzip -o python-sample-app-delete-me.zip
166166
167167
# Export environment variables for instrumentation
168168
cd ./django_frontend_service
@@ -294,8 +294,8 @@ resource "null_resource" "remote_service_setup" {
294294
${var.get_adot_wheel_command}
295295
296296
# Get and run the sample application with configuration
297-
aws s3 cp ${var.sample_app_zip} ./python-sample-app.zip
298-
unzip -o python-sample-app.zip
297+
aws s3 cp ${var.sample_app_zip} ./python-sample-app-delete-me.zip
298+
unzip -o python-sample-app-delete-me.zip
299299
300300
# Export environment variables for instrumentation
301301
cd ./django_remote_service

validator/src/main/resources/expected-data-template/python/ec2/default/aws-otel-custom-metrics.mustache

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
value: {{serviceName}}
1313
-
1414
name: cloud.region
15-
value: ANY_VALUE
15+
value: {{AWS_REGION}}
1616
-
1717
name: service.name
1818
value: {{serviceName}}
@@ -36,7 +36,7 @@
3636
value: aws
3737
-
3838
name: cloud.account.id
39-
value: ANY_VALUE
39+
value: 654654176582
4040
-
4141
name: host.name
4242
value: ANY_VALUE
@@ -64,7 +64,7 @@
6464
value: {{serviceName}}
6565
-
6666
name: cloud.region
67-
value: ANY_VALUE
67+
value: {{AWS_REGION}}
6868
-
6969
name: service.name
7070
value: {{serviceName}}
@@ -88,7 +88,7 @@
8888
value: aws
8989
-
9090
name: cloud.account.id
91-
value: ANY_VALUE
91+
value: 654654176582
9292
-
9393
name: host.name
9494
value: ANY_VALUE
@@ -116,7 +116,7 @@
116116
value: {{serviceName}}
117117
-
118118
name: cloud.region
119-
value: ANY_VALUE
119+
value: {{AWS_REGION}}
120120
-
121121
name: service.name
122122
value: {{serviceName}}
@@ -140,7 +140,7 @@
140140
value: aws
141141
-
142142
name: cloud.account.id
143-
value: ANY_VALUE
143+
value: 654654176582
144144
-
145145
name: host.name
146146
value: ANY_VALUE

0 commit comments

Comments
 (0)