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

Add otelaws middleware to support trace propagation in the AWS SDK v2 module #2856

Merged
merged 7 commits into from Oct 12, 2022
Merged

Conversation

lukestoward
Copy link
Contributor

@lukestoward lukestoward commented Oct 11, 2022

Currently the otelaws instrumentation module does not propagate tracing information as part of any AWS SDK v2 call. To support this, I've added a new finalizer middleware that uses the provided text map propagator (or global using the OTel API) and injects the trace information into the request headers.

This functionality is really important for me as I am heavily dependent on the AWS SDK v2 Go module and, most importantly, tracing across AWS service calls.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 11, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: lukestoward / name: Luke Stoward (f5be1c5)

@lukestoward lukestoward changed the title Add middleware for trace propagation Add otelaws middleware to support trace propagation in the AWS SDK v2 module Oct 11, 2022
Copy link
Member

@Aneurysm9 Aneurysm9 left a comment

Choose a reason for hiding this comment

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

Can you please add a CHANGELOG entry and tests for the new functionality?

@lukestoward
Copy link
Contributor Author

@Aneurysm9 I have added tests and made the propagator configurable. Please could you re-review, thanks.

CHANGELOG.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 12, 2022

Codecov Report

Merging #2856 (d2a657b) into main (151c999) will increase coverage by 0.0%.
The diff coverage is 94.7%.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2856   +/-   ##
=====================================
  Coverage   69.2%   69.3%           
=====================================
  Files        145     145           
  Lines       6712    6729   +17     
=====================================
+ Hits        4651    4667   +16     
- Misses      1947    1948    +1     
  Partials     114     114           
Impacted Files Coverage Δ
...tation/github.com/aws/aws-sdk-go-v2/otelaws/aws.go 93.5% <92.8%> (-0.4%) ⬇️
...ion/github.com/aws/aws-sdk-go-v2/otelaws/config.go 100.0% <100.0%> (ø)

@lukestoward
Copy link
Contributor Author

@dmathieu I've rebased and fixed the linter complaints. Please could you re-trigger the workflow. Thanks.

@lukestoward
Copy link
Contributor Author

Awesome, looks like all checks are passing. Rather than keep rebasing, please let me know when this can be merged and I will rebase ASAP.

Please let me know if anything else is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants