forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 21
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
[extension/awsmiddleware] Add ID to context to trace requests. #128
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix go.mod name.
SaxyPandaBear
previously approved these changes
Oct 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
adam-mateen
reviewed
Oct 20, 2023
adam-mateen
reviewed
Oct 20, 2023
adam-mateen
reviewed
Oct 20, 2023
adam-mateen
previously approved these changes
Oct 20, 2023
SaxyPandaBear
approved these changes
Oct 20, 2023
adam-mateen
approved these changes
Oct 20, 2023
lisguo
pushed a commit
to lisguo/opentelemetry-collector-contrib
that referenced
this pull request
Oct 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description: Previously, there was no way to determine if a received request/response were a pair. Adds an ID to the context in the
RequestHandler
wrappers and retrieves it in theResponseHandler
wrappers. Passes the ID to the handlers so implementations can track the ID.Other changes
RequestHandlers()
andResponseHandlers()
functions into a singleHandlers()
function to make it easier to create handlers that implement both and need to be configured on both.ValidateResponse
instead ofUnmarshal
. This is so the response handler will be reached on 4xx/5xx status codes. If there's an error, it will never get toUnmarshal
(see aws-sdk-go requests.go). Keep in mind that if retries are enabled,ValidateResponse
will be run on each attempt.go.mod
package name. Should have beenamazon-contributing
instead ofopen-telemetry
. This broke imports.to their configurations and use the
awsmiddleware.GetConfigurer(host.GetExtensions(), *cfg.Middleware)
.Link to tracking Issue: N/A
Testing: Added unit tests for the requests. Imported this commit into go.mod without issue.
Documentation: Updated README to match changes.