Skip to content

Commit 4a46f99

Browse files
authored
Merge branch 'main' into sigv4_support
2 parents 561fa01 + c5cad2e commit 4a46f99

File tree

5 files changed

+9
-30
lines changed

5 files changed

+9
-30
lines changed

.github/workflows/application-signals-e2e-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
role-to-assume: arn:aws:iam::${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }}:role/${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }}
3535
aws-region: us-east-1
3636

37-
- uses: actions/download-artifact@v3
37+
- uses: actions/download-artifact@v4
3838
with:
3939
name: ${{ inputs.staging-wheel-name }}
4040

.github/workflows/main-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
aws s3 cp dist/${{ steps.staging_wheel_output.outputs.STAGING_WHEEL}} s3://${{ env.STAGING_S3_BUCKET }}
8888
8989
- name: Upload Wheel to GitHub Actions
90-
uses: actions/upload-artifact@v3
90+
uses: actions/upload-artifact@v4
9191
with:
9292
name: ${{ steps.staging_wheel_output.outputs.STAGING_WHEEL}}
9393
path: dist/${{ steps.staging_wheel_output.outputs.STAGING_WHEEL}}

.github/workflows/release-lambda.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
if: ${{ success() }}
131131
uses: actions/upload-artifact@v4
132132
with:
133-
name: ${{ env.LAYER_NAME }}
133+
name: ${{ env.LAYER_NAME }}-${{ matrix.aws_region }}
134134
path: ${{ env.LAYER_NAME }}/${{ matrix.aws_region }}
135135
- name: clean s3
136136
if: always()
@@ -146,8 +146,9 @@ jobs:
146146
- name: download layerARNs
147147
uses: actions/download-artifact@v4
148148
with:
149-
name: ${{ env.LAYER_NAME }}
149+
pattern: ${{ env.LAYER_NAME }}-*
150150
path: ${{ env.LAYER_NAME }}
151+
merge-multiple: true
151152
- name: show layerARNs
152153
run: |
153154
for file in ${{ env.LAYER_NAME }}/*

aws-opentelemetry-distro/src/amazon/opentelemetry/distro/_aws_metric_attribute_generator.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -457,13 +457,11 @@ def _set_remote_type_and_identifier(span: ReadableSpan, attributes: BoundedAttri
457457
# This addresses a Lambda topology issue in Application Signals.
458458
# More context in PR: https://github.com/aws-observability/aws-otel-python-instrumentation/pull/319
459459
#
460-
# NOTE: The env vars LAMBDA_APPLICATION_SIGNALS_REMOTE_SERVICE and
461-
# LAMBDA_APPLICATION_SIGNALS_REMOTE_ENVIRONMENT were introduced as part of this fix.
462-
# They are optional and allow users to override the default values if needed.
460+
# NOTE: The env var LAMBDA_APPLICATION_SIGNALS_REMOTE_ENVIRONMENT was introduced as part of this fix.
461+
# It is optional and allows users to override the default value if needed.
463462
if span.attributes.get(_RPC_METHOD) == "Invoke":
464-
attributes[AWS_REMOTE_SERVICE] = os.environ.get(
465-
"LAMBDA_APPLICATION_SIGNALS_REMOTE_SERVICE", span.attributes.get(AWS_LAMBDA_FUNCTION_NAME)
466-
)
463+
attributes[AWS_REMOTE_SERVICE] = _escape_delimiters(span.attributes.get(AWS_LAMBDA_FUNCTION_NAME))
464+
467465
attributes[AWS_REMOTE_ENVIRONMENT] = (
468466
f'lambda:{os.environ.get("LAMBDA_APPLICATION_SIGNALS_REMOTE_ENVIRONMENT", "default")}'
469467
)

aws-opentelemetry-distro/tests/amazon/opentelemetry/distro/test_aws_metric_attribute_generator.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,26 +1195,6 @@ def test_sdk_client_span_with_remote_resource_attributes(self):
11951195
self._mock_attribute([AWS_LAMBDA_FUNCTION_NAME, SpanAttributes.RPC_METHOD], [None, None])
11961196
os.environ.pop("LAMBDA_APPLICATION_SIGNALS_REMOTE_ENVIRONMENT", None)
11971197

1198-
# Test AWS Lambda Invoke scenario with user-configured lambda remote service
1199-
os.environ["LAMBDA_APPLICATION_SIGNALS_REMOTE_SERVICE"] = "test_downstream_lambda2"
1200-
self.span_mock.kind = SpanKind.CLIENT
1201-
self._mock_attribute(
1202-
[AWS_LAMBDA_FUNCTION_NAME, SpanAttributes.RPC_METHOD],
1203-
["testLambdaFunction", "Invoke"],
1204-
keys,
1205-
values,
1206-
)
1207-
dependency_attributes = _GENERATOR.generate_metric_attributes_dict_from_span(self.span_mock, self.resource).get(
1208-
DEPENDENCY_METRIC
1209-
)
1210-
self.assertEqual(dependency_attributes.get(AWS_REMOTE_SERVICE), "test_downstream_lambda2")
1211-
self.assertEqual(dependency_attributes.get(AWS_REMOTE_ENVIRONMENT), "lambda:default")
1212-
self.assertNotIn(AWS_REMOTE_RESOURCE_TYPE, dependency_attributes)
1213-
self.assertNotIn(AWS_REMOTE_RESOURCE_IDENTIFIER, dependency_attributes)
1214-
self.assertNotIn(AWS_CLOUDFORMATION_PRIMARY_IDENTIFIER, dependency_attributes)
1215-
self._mock_attribute([AWS_LAMBDA_FUNCTION_NAME, SpanAttributes.RPC_METHOD], [None, None])
1216-
os.environ.pop("LAMBDA_APPLICATION_SIGNALS_REMOTE_SERVICE", None)
1217-
12181198
# Test AWS Lambda non-Invoke scenario
12191199
self.span_mock.kind = SpanKind.CLIENT
12201200
lambda_arn = "arn:aws:lambda:us-east-1:123456789012:function:testLambda"

0 commit comments

Comments
 (0)