Skip to content

Conversation

@tylerbenson
Copy link
Contributor

@tylerbenson tylerbenson commented Jan 30, 2018

This also fixes the AWS integration. The request handler was being added too late, so it was having no effect. Additional testing is added too.

@tylerbenson tylerbenson requested a review from realark January 30, 2018 00:44
@tylerbenson tylerbenson force-pushed the tyler/aws branch 2 times, most recently from c6a666d to 91b597d Compare January 30, 2018 01:10
@tylerbenson tylerbenson added this to the 0.3.0 milestone Jan 30, 2018
@tylerbenson tylerbenson added type: bug Bug report and fix inst: others All other instrumentations labels Jan 30, 2018
@realark
Copy link
Contributor

realark commented Jan 30, 2018

It looks like the aws contrib mucks with the headers as well. Do you think that has anything to do with the auth failure? https://github.com/opentracing-contrib/java-aws-sdk/blob/master/src/main/java/io/opentracing/contrib/aws/TracingRequestHandler.java#L68-L69

@tylerbenson
Copy link
Contributor Author

@realark So while I think the remaining inject is unnecessary, I don't think it is going to break the signature as it looks like that gets called before the signature is generated, so those headers should be included in the signature. This was not the case by the apache httpclient instrumentation added headers.

realark
realark previously approved these changes Jan 30, 2018
realark
realark previously approved these changes Jan 31, 2018
Handler was being added on builder return, which was too late.  It appears it would have also failed if an existing handler resulted in a unmodifiable list to be returned.
@tylerbenson tylerbenson merged commit 4e90a7d into master Jan 31, 2018
@tylerbenson tylerbenson deleted the tyler/aws branch January 31, 2018 00:28

final boolean awsClientCall = request.getHeaders("amz-sdk-invocation-id").length > 0;
// AWS calls are often signed, so we can't add headers without breaking the signature.
if (!awsClientCall) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

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

Labels

inst: others All other instrumentations type: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants