Skip to content

Conversation

@cfbao
Copy link
Contributor

@cfbao cfbao commented Dec 25, 2024

Fixes #2345

Changes

Move code that adds context propagation data to requests into a dedicated method AddPropagationDataToRequest, and always run that regardless of sampling decision.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 25, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot added the comp:instrumentation.aws Things related to OpenTelemetry.Instrumentation.AWS label Dec 25, 2024
@cfbao
Copy link
Contributor Author

cfbao commented Dec 25, 2024

There's no existing unit tests in this area, but I've verified that correctly adds relevant message attribute to SQS requests using the script showed in #2345.

@cfbao cfbao marked this pull request as ready for review December 25, 2024 03:16
@cfbao cfbao requested a review from a team as a code owner December 25, 2024 03:16
Copy link
Member

@ppittle ppittle left a comment

Choose a reason for hiding this comment

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

@cfbao - Thank you for the contribution!

There's no existing unit tests in this area, but I've verified that correctly adds relevant message attribute to SQS requests using the script showed in #2345.

Would it be possible to add some unit test coverage around this feature?

Otherwise, this looks good to me.

@cfbao
Copy link
Contributor Author

cfbao commented Jan 1, 2025

@ppittle Oh I missed what these instrumentation tests were doing.
Added coverage on SQS message attributes for both sampled and not sampled requests now.

@cfbao
Copy link
Contributor Author

cfbao commented Jan 6, 2025

Fixed markdownlint issue.

This test failure seems unrelated to this change though:
https://github.com/open-telemetry/opentelemetry-dotnet-contrib/actions/runs/12579606871/job/35060088493#step:7:72
or at least I'm not able to repro locally.

Copy link
Member

@Kielek Kielek left a comment

Choose a reason for hiding this comment

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

Approving and merging based on @ppittle decision.

@Kielek Kielek merged commit 5512176 into open-telemetry:main Jan 8, 2025
61 checks passed
@codecov
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (71655ce) to head (430d9ed).
Report is 678 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #2447       +/-   ##
==========================================
- Coverage   73.91%       0   -73.92%     
==========================================
  Files         267       0      -267     
  Lines        9615       0     -9615     
==========================================
- Hits         7107       0     -7107     
+ Misses       2508       0     -2508     

see 263 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:instrumentation.aws Things related to OpenTelemetry.Instrumentation.AWS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] AWS instrumentation not adding request specific info on requests *not* sampled

5 participants