Skip to content

fix(opentelemetry-instrumentation-aws-sdk)!: rename aws.region to cloud.region #2842

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

Conversation

yuliia-fryshko
Copy link
Contributor

@yuliia-fryshko yuliia-fryshko commented May 22, 2025

Fixes #2841

Which problem is this PR solving?

  • This PR updates the AWS SDK instrumentation to align with the latest semantic conventions, which introduced generic and standardized cloud.region instead of vendor specific aws.region.

Short description of the changes

  • Replaced all usage of aws.region with cloud.region.
  • This change affects instrumentation for AWS SDK including Bedrock and S3.

Notes

  • This is a breaking change for users relying on the presence of the aws.region attribute.

Copy link

linux-foundation-easycla bot commented May 22, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: yuliia-fryshko / name: Yuliia Fryshko (dc9663c)
  • ✅ login: david-luna / name: David Luna (a7c54fb)

@yuliia-fryshko yuliia-fryshko force-pushed the add-cloud-region-attribute branch from 6ccf4ed to dc9663c Compare May 22, 2025 15:04
@yuliia-fryshko yuliia-fryshko marked this pull request as ready for review May 22, 2025 15:04
@yuliia-fryshko yuliia-fryshko requested a review from a team as a code owner May 22, 2025 15:04
@trentm trentm changed the title refactor(opentelemetry-instrumentation-aws-sdk): rename aws.region to… refactor(opentelemetry-instrumentation-aws-sdk): rename aws.region to cloud.region May 27, 2025
@trentm trentm changed the title refactor(opentelemetry-instrumentation-aws-sdk): rename aws.region to cloud.region fix(opentelemetry-instrumentation-aws-sdk)!: rename aws.region to cloud.region May 27, 2025
Copy link
Contributor

@trentm trentm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I updated the PR title (following conventional commits) to indicate that this is a breaking change. That's necessary to ensure the next version is 0.54.0 rather than 0.53.1.

Code owners: any strong opinions here?

@@ -15,7 +15,7 @@
*/
export enum AttributeNames {
AWS_OPERATION = 'aws.operation',
AWS_REGION = 'aws.region',
CLOUD_REGION = 'cloud.region',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cloud.region does have a constant in @opentelemetry/semantic-conventions. However, we can defer using that constant (and the others in this instrumentation) to #2377

The current constant using the old, deprecated naming (SEMRESATTRS_CLOUD_REGION) is/was intended for use as a Resource attribute. That was before open-telemetry/semantic-conventions#2238 expanded the use of cloud.region beyond resource attributes. That's why I'm not suggesting this PR use SEMRESATTRS_CLOUD_REGION.

Copy link

codecov bot commented May 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.66%. Comparing base (33337d4) to head (a7c54fb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2842      +/-   ##
==========================================
+ Coverage   89.65%   89.66%   +0.01%     
==========================================
  Files         185      185              
  Lines        9034     9034              
  Branches     1852     1852              
==========================================
+ Hits         8099     8100       +1     
+ Misses        935      934       -1     
Files with missing lines Coverage Δ
...entelemetry-instrumentation-aws-sdk/src/aws-sdk.ts 92.94% <100.00%> (ø)
...opentelemetry-instrumentation-aws-sdk/src/enums.ts 100.00% <100.00%> (ø)
...opentelemetry-instrumentation-aws-sdk/src/utils.ts 92.85% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pichlermarc
Copy link
Member

Code owners: any strong opinions here?

cc @jj22ee @trivikr (component owners)

Copy link
Contributor

@jj22ee jj22ee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, no strong opinions from me.

@jj22ee jj22ee added the has:owner-approval Approved by Component Owner label May 28, 2025
@david-luna david-luna merged commit 6f65523 into open-telemetry:main May 28, 2025
23 checks passed
@dyladan dyladan mentioned this pull request May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace aws.region with cloud.region in AWS SDK instrumentation
7 participants