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

fix(detector-aws): replace ecs deprecated semconv consts and hardcoded strings #2674

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

garysassano
Copy link
Contributor

@garysassano garysassano commented Jan 20, 2025

Which problem is this PR solving?

  • Updates AWS ECS detector tests to use proper semantic convention constants instead of deprecated ones
  • Removes redundant semantic resource attributes file by using constants from semconv

Short description of the changes

  • Replaced deprecated SEMRESATTRS_* and CLOUDPROVIDERVALUES_* constants with their ATTR_* and *_VALUE_* counterparts from semconv following unstable semconv best practices
  • Removed SemanticResourceAttributes.ts file as ATTR_CLOUD_RESOURCE_ID is now properly imported from /src/semconv.ts
  • Organized imports alphabetically for better readability

@garysassano garysassano requested a review from a team as a code owner January 20, 2025 23:40
@github-actions github-actions bot requested a review from jj22ee January 20, 2025 23:40
@garysassano garysassano force-pushed the upd-ecs-detector branch 2 times, most recently from 3c659ca to 143ccfb Compare January 20, 2025 23:47
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.95%. Comparing base (4f1e605) to head (d95a63f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2674      +/-   ##
==========================================
- Coverage   90.96%   90.95%   -0.02%     
==========================================
  Files         172      171       -1     
  Lines        8137     8136       -1     
  Branches     1649     1649              
==========================================
- Hits         7402     7400       -2     
- Misses        735      736       +1     
Files with missing lines Coverage Δ
...ource-detector-aws/src/detectors/AwsEcsDetector.ts 100.00% <ø> (ø)
...e-detector-aws/src/detectors/AwsEcsDetectorSync.ts 97.08% <ø> (-0.03%) ⬇️
...opentelemetry-resource-detector-aws/src/semconv.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@garysassano garysassano changed the title fix(detector-ecs): replace deprecated consts and hardcoded strings fix(detector-ecs): replace semconv deprecated consts and hardcoded strings Jan 21, 2025
@garysassano garysassano changed the title fix(detector-ecs): replace semconv deprecated consts and hardcoded strings fix(detector-aws): replace ecs semconv deprecated consts and hardcoded strings Jan 21, 2025
@garysassano garysassano changed the title fix(detector-aws): replace ecs semconv deprecated consts and hardcoded strings fix(detector-aws): replace ecs deprecated semconv consts and hardcoded strings Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants