-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Issue #, if available:** Lambda Topology Issue Context: aws-observability/aws-otel-python-instrumentation#319 **Description of changes:** - Apply fix for the Lambda Topology issue. The logic mimics the fix in our ADOT Python SDK. - Adding back logic to generate `aws.lambda.function.name` and `aws.lambda.function.arn` span attributes for Lambda. Previously, we removed these changes in the AWS Resources expansion due to the Lambda Topology issue. - More context about adding support for Lambda as AWS Resource: - aws-observability/aws-otel-python-instrumentation#265 **Test plan:** The same cases in the test plan of this [PR](aws-observability/aws-otel-python-instrumentation#319) were validated by building a custom JavaScript lambda layer. Below is a screenshot of all the test cases in a single topology. We can observe the following: - Service entity node for `Invoke` call to downstream lambda. - AWS Resource node for `GetFunction` call to downstream lambda. - AWS Resource node for `ListBuckets` call to downstream s3. - Another AWS Resource node for `GetBucketLocation` call to downstream s3. <img width="1359" alt="Screenshot 2025-02-05 at 10 15 26 AM" src="https://github.com/user-attachments/assets/14d38cad-32c7-4e2c-a987-c424c7fb7296" /> Here we see downstream lambda called with `Invoke` is correctly treated as RemoteService entity when not instrumented:  Additionally, I generated the spans locally to validate the new lambda instrumentation patch behaves correctly. **Generated span for `Invoke` call** We see the new `aws.remote.environment` attribute is present in span so the downstream lambda will be treated as a Service type in Application Signals backend. <img width="1124" alt="invoke" src="https://github.com/user-attachments/assets/81cefb44-c951-4ad0-8aeb-9a2064d7d0ea" /> **Generated span for `GetFunction` call** We see `aws.remote.resource.identifier` and `aws.cloudformation.primary.identifier` are set so the downstream lambda will be treated as an AWS resource type in Application Signals backend. <img width="1124" alt="get-function" src="https://github.com/user-attachments/assets/abfd700b-7966-4d93-bb47-868c31be9a34" /> By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
- Loading branch information
Showing
5 changed files
with
101 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 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 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 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 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