Skip to content

Commit d2f0d15

Browse files
committed
testing pr changes
1 parent ee3e3a4 commit d2f0d15

File tree

5 files changed

+34
-11
lines changed

5 files changed

+34
-11
lines changed

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

Lines changed: 1 addition & 1 deletion
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

.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/main.tf

Lines changed: 5 additions & 5 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
@@ -180,7 +180,7 @@ resource "null_resource" "main_service_setup" {
180180
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=localhost:4317
181181
export OTEL_EXPORTER_OTLP_METRICS_INSECURE=true
182182
export OTEL_TRACES_SAMPLER=always_on
183-
export OTEL_RESOURCE_ATTRIBUTES="service.name=python-sample-application-${var.test_id},deployment.environment.name=ec2:default"
183+
export OTEL_RESOURCE_ATTRIBUTES="service.name=python-sample-application-${var.test_id},deployment.environment.name=custom_environment"
184184
export AWS_REGION='${var.aws_region}'
185185
python${var.language_version} manage.py migrate
186186
nohup opentelemetry-instrument python${var.language_version} manage.py runserver 0.0.0.0:8000 --noreload &
@@ -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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
dimensions:
77
-
88
name: deployment.environment.name
9-
value: ec2:default
9+
value: custom_environment
1010
-
1111
name: aws.local.service
1212
value: {{serviceName}}
@@ -58,7 +58,7 @@
5858
dimensions:
5959
-
6060
name: deployment.environment.name
61-
value: ec2:default
61+
value: custom_environment
6262
-
6363
name: aws.local.service
6464
value: {{serviceName}}
@@ -110,7 +110,7 @@
110110
dimensions:
111111
-
112112
name: deployment.environment.name
113-
value: ec2:default
113+
value: custom_environment
114114
-
115115
name: aws.local.service
116116
value: {{serviceName}}

0 commit comments

Comments
 (0)