Skip to content
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

feat: Add auto-instrumentation support for Step Functions, SNS, Secre… #899

Merged
merged 10 commits into from
Oct 9, 2024

Conversation

yiyuan-he
Copy link
Contributor

@yiyuan-he yiyuan-he commented Oct 1, 2024

Description of changes:

Changes in ADOT package to support new AWS resources in Java V1 & V2 SDKs.

Related changes for V1 SDK in upstream package: mxiamxia/opentelemetry-java-instrumentation#11

Related changes for V2 SDK in upstream package: mxiamxia/opentelemetry-java-instrumentation#12

These changes add auto-instrumentation support for the following AWS resources. Additionally, a new attribute for
aws.remote.resource.cfn.primary.identifier is also added for each new resource.

Test Plan:

Set up a client-server with auto-instrumentation to verify that the correct span data is being generated.

Note: V1 span data is top pic and V2 span data is bottom pic for each resource.

aws.lambda.function.name
lambda-function-name-span-data-verification-v1
lambda-function-name-span-data-verification-v2

aws.lambda.resource_mapping.id
lambda-resource-mapping-id-span-data-verification-v1
lambda-resource-mapping-id-span-data-verification-v2

aws.secretsmanager.secret.arn
secretsmanager-secret-arn-span-data-verification-v1
secretsmanager-secret-arn-span-data-verification-v2

aws.sns.topic.arn
sns-topic-arn-span-data-verification-v1
sns-topic-arn-span-data-verification-v2

aws.stepfunctions.activity.arn
stepfunctions-activity-arn-span-data-verification-v1
sfn-activity-arn-span-data-verification-v2

aws.stepfunction.state_machine.arn
stepfunctions-state-machine-arn-span-data-verification-v1
sfn-state-machine-arn-span-data-verification-v2

Metric Attribute Generator Unit Test
Screenshot 2024-10-02 at 2 59 35 PM

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@yiyuan-he yiyuan-he requested a review from mxiamxia October 1, 2024 23:50
mxiamxia
mxiamxia previously approved these changes Oct 4, 2024
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 93.15068% with 5 lines in your changes missing coverage. Please review.

Project coverage is 74.34%. Comparing base (09e6487) to head (2f3002f).
Report is 348 commits behind head on main.

Files with missing lines Patch % Lines
...vaagent/providers/AwsMetricAttributeGenerator.java 91.37% 4 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##               main     #899       +/-   ##
=============================================
- Coverage     85.71%   74.34%   -11.38%     
- Complexity       19      273      +254     
=============================================
  Files             3       19       +16     
  Lines            49      951      +902     
  Branches          5      141      +136     
=============================================
+ Hits             42      707      +665     
- Misses            3      202      +199     
- Partials          4       42       +38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mxiamxia mxiamxia merged commit cb31105 into aws-observability:main Oct 9, 2024
4 checks passed
@yiyuan-he yiyuan-he deleted the new-resources branch October 9, 2024 16:15
mxiamxia added a commit that referenced this pull request Oct 30, 2024
*Issue #, if available:*
Main-build Enablement E2E tests started failing starting from this
[PR](#899).
It was due to the usage of `isEmpty()` for Optional datatypes, which is
available only from Java 11

*Description of changes:*
Change .isEmpty() to .isPresent() for optional types


By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

Co-authored-by: Min Xia <xiami@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants