opentelemetry-js-contrib icon indicating copy to clipboard operation
opentelemetry-js-contrib copied to clipboard

fix(detector-aws): Get ECS Container ID from metadata

Open iancward opened this issue 1 year ago • 3 comments

Which problem is this PR solving?

  • The AWS ECS Resource detector is munging the container ID when running in AWS ECS Fargate ref: #2032

Short description of the changes

  • Get ECS container ID from ECS metadata. This will get the correct value whether running in ECS Fargate or ECS on EC2

iancward avatar Oct 28 '24 20:10 iancward

CLA Not Signed

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.88%. Comparing base (9a20e15) to head (5f48d6a). Report is 173 commits behind head on main.

Files with missing lines Patch % Lines
...e-detector-aws/src/detectors/AwsEcsDetectorSync.ts 71.42% 2 Missing :warning:

:x: Your patch status has failed because the patch coverage (71.42%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2509      +/-   ##
==========================================
+ Coverage   90.85%   91.88%   +1.02%     
==========================================
  Files         159       52     -107     
  Lines        7853     2636    -5217     
  Branches     1622      477    -1145     
==========================================
- Hits         7135     2422    -4713     
+ Misses        718      214     -504     
Files with missing lines Coverage Δ
...e-detector-aws/src/detectors/AwsEcsDetectorSync.ts 32.22% <71.42%> (-64.90%) :arrow_down:

... and 107 files with indirect coverage changes

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

codecov[bot] avatar Oct 30 '24 10:10 codecov[bot]

this would be helpful to DataDog customers using JavaScript instrumentation; several integrations in Datadog rely on container.id

jackgopack4 avatar Mar 11 '25 19:03 jackgopack4

@iancward thank you for your contribution - due to organization policy, we unfortunately we cannot accept any PRs without the CLA signed (see here for instructions on how to do this).

If this is still something you're interested in fixing this, please re-open a new PR once you have signed the CLA - thanks!

pichlermarc avatar May 19 '25 11:05 pichlermarc

Hi @pichlermarc, apologies, the EasyCLA process is new for my company and it's taking significantly longer than expected to find the right folks to handle the paperwork, even though our legal team has signed off on the CCLA.

I'll open a new PR once this is is taken care of. Thanks!

iancward avatar May 19 '25 15:05 iancward