-
Notifications
You must be signed in to change notification settings - Fork 118
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
fix: replace segment name from env on BeginSegment #304
Conversation
That makes sense? @bhautikpip |
Yes, I think this check will be useful when we directly call |
Should we remove the check from here aws-xray-sdk-go/xray/handler.go Line 39 in 015dc2e
xray.BeginSegment() method ? I think in the case of http handler if customer has used AWS_XRAY_TRACING_NAME then the same condition will be evaluated twice.
|
Sorry @bhautikpip, but I did not understand. If you remove this condition, what about situations where we don't use xray.BeginSegment? |
So basically aws-xray-sdk-go/xray/segment.go Line 77 in 9d2f59c
BeginSegmentWithSampling method so if we keep this condition inside BeginSegmentWithSampling then we can remove this condition inside NewFixedSegmentNamer . Hope this makes sense!
|
@bhautikpip Yes you are right. I will work on it, thanks for the review |
thanks @bhautikpip for review aws#304
Done de8e0b9 @bhautikpip |
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 :)
It is not clear from the official documentation that this variable is used only in HTTP situations:
This PR applies the same logic so that the segment name is replaced by the environment variable
AWS_XRAY_TRACING_NAME
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.