Skip to content

feat: Extract account/access key id and region for cross-account support #1081

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

Merged
merged 10 commits into from
Jul 5, 2025

Conversation

blairhyy-amazon
Copy link
Member

@blairhyy-amazon blairhyy-amazon commented May 12, 2025

Description of changes:
Changes in ADOT package to support cross-account observability in Java V1 & V2 SDK.

  1. We extract account id and region from remote resource arn.
  2. We pass account access key id and region from span to metric when resource arn is not available.
  3. Add instrumentation patch for AWS SDK

Related changes in upstream package: yiyuan-he/opentelemetry-java-instrumentation#2

Testing Plan:

  1. Unit tests for extracting account id and region from remote resource arn.
  2. Unit tests for extracting access key and region from credential.
  3. Unit test for the scenario when resource arn and credential information are both available.
  4. Contract tests

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

bjrara
bjrara previously approved these changes Jun 25, 2025
bjrara
bjrara previously approved these changes Jul 2, 2025
bjrara
bjrara previously approved these changes Jul 3, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jul 4, 2025

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

Codecov Report

Attention: Patch coverage is 78.68852% with 26 lines in your changes missing coverage. Please review.

Project coverage is 72.49%. Comparing base (09e6487) to head (1d19389).
Report is 432 commits behind head on main.

Files with missing lines Patch % Lines
...vaagent/providers/AwsMetricAttributeGenerator.java 72.94% 22 Missing and 1 partial ⚠️
...pentelemetry/javaagent/providers/SqsUrlParser.java 88.00% 0 Missing and 3 partials ⚠️

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

Additional details and impacted files
@@              Coverage Diff              @@
##               main    #1081       +/-   ##
=============================================
- Coverage     85.71%   72.49%   -13.22%     
- Complexity       19      403      +384     
=============================================
  Files             3       33       +30     
  Lines            49     1509     +1460     
  Branches          5      206      +201     
=============================================
+ Hits             42     1094     +1052     
- Misses            3      353      +350     
- Partials          4       62       +58     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bjrara bjrara merged commit 2f48b77 into aws-observability:main Jul 5, 2025
11 of 20 checks passed
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