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

[Instrumentation.AWS] Move adding request and response info to AWSTracingPipelineHandler #2137

Conversation

muhammad-othman
Copy link
Member

@muhammad-othman muhammad-othman commented Oct 2, 2024

Fixes #2108

Changes

This pull request addresses issue #2108 where AWS SDK request info were not being applied as expected. The logic for adding these info has been moved to the AWSTracingPipelineHandler which is executed early in the AWS SDK pipeline in order to manipulate outgoing requests objects before they are serialized.

I didn't add additional tests here since we will need to examine the request at a specific part of the AWS request pipeline to validate these changes, but I ran the same code that was provided in the issue and the traceparent was sent and received properly
image

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Appropriate CHANGELOG.md files updated for non-trivial changes

@muhammad-othman muhammad-othman requested a review from a team as a code owner October 2, 2024 20:20
@github-actions github-actions bot requested review from ppittle and srprash October 2, 2024 20:20
@github-actions github-actions bot added the comp:instrumentation.aws Things related to OpenTelemetry.Instrumentation.AWS label Oct 2, 2024
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 89.02439% with 9 lines in your changes missing coverage. Please review.

Project coverage is 86.09%. Comparing base (71655ce) to head (db81c34).
Report is 548 commits behind head on main.

Files with missing lines Patch % Lines
...on.AWS/Implementation/AWSTracingPipelineHandler.cs 88.15% 9 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2137       +/-   ##
===========================================
+ Coverage   73.91%   86.09%   +12.17%     
===========================================
  Files         267       34      -233     
  Lines        9615      906     -8709     
===========================================
- Hits         7107      780     -6327     
+ Misses       2508      126     -2382     
Flag Coverage Δ
unittests-Instrumentation.AWS 86.09% <89.02%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...AWS/Implementation/AWSPropagatorPipelineHandler.cs 100.00% <100.00%> (ø)
...AWS/Implementation/AWSTracingPipelineCustomizer.cs 90.90% <100.00%> (+3.40%) ⬆️
...on.AWS/Implementation/AWSTracingPipelineHandler.cs 88.15% <88.15%> (+0.40%) ⬆️

... and 272 files with indirect coverage changes

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added Stale and removed Stale labels Oct 12, 2024
@@ -18,6 +18,7 @@ internal static class AWSSemanticConventions
public const string AttributeAWSBedrockDataSourceId = "aws.bedrock.data_source.id";
public const string AttributeAWSBedrockGuardrailId = "aws.bedrock.guardrail.id";
public const string AttributeAWSBedrockKnowledgeBaseId = "aws.bedrock.knowledge_base.id";
public const string AttributeAWSeBedrock = "aws_bedrock";
Copy link
Member

Choose a reason for hiding this comment

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

typo? Should be AttributeAWSBedrock?

Copy link
Member

Choose a reason for hiding this comment

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

Is this used anywhere? (I don't have the full code base in front me)

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@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 review.

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.

AWS instrumentation not adding request specific info (e.g. SQS message attributes)
4 participants