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

Give up when there is no open segment and LOG_ERROR is configured #58

Merged
merged 4 commits into from
May 14, 2018

Conversation

pfreixes
Copy link
Contributor

Without setting this flag as False, any HTTP call done with the Aiohttp
Client when there is no an active segment will fail with the
SegmentNotFoundException exception.

This issue can be annoying for this systems that do not create
explicitly the segements and relay on the sampled incomming requests,
which create automatically segments just for a sub set of the incomming
request.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Without setting this flag as False, any HTTP call done with the Aiohttp
Client when there is no an active segment will fail with the
SegmentNotFoundException exception.

This issue can be annoying for this systems that do not create
explicitly the segements and relay on the sampled incomming requests,
which create automatically segments just for a sub set of the incomming
request.
@pfreixes
Copy link
Contributor Author

Please consider this as a potential bug that might require a minor release.

@pfreixes
Copy link
Contributor Author

Closing, the segment is always created by the middleware ... If I've found something different I will reopen it. Sorry for the noise

@pfreixes pfreixes closed this May 10, 2018
@pfreixes pfreixes reopened this May 10, 2018
@pfreixes
Copy link
Contributor Author

Reopening, worth considering the option of giving the option to the user to not break the request if any segment is present.

@haotianw465
Copy link
Contributor

Hi, did you check AWS_XRAY_CONTEXT_MISSING on this page? https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-python-configuration.html

If the aiohttp client errors out due to segment is None in case of LOG_ERROR, then the aiohttp client patcher code needs to be fixed so it uses the original function when segment is not present.

@pfreixes
Copy link
Contributor Author

You are right. In any case, PR fixed to take into account that Aiohttp client tracing must give up silently when the context_missing is configured as LOG_ERROR.

So, yes it needs to be fixed yet.

@pfreixes pfreixes changed the title New flag raise_if_not_subsegment for Aiohttp client Give up when there is no open segment and LOG_ERROR is configured May 12, 2018
@haotianw465 haotianw465 merged commit 7a71da7 into aws:master May 14, 2018
@pfreixes
Copy link
Contributor Author

Any chance to have a minor release?

@haotianw465
Copy link
Contributor

Yes we will get a minor release as soon as possible. Thanks for your patience.

@pfreixes
Copy link
Contributor Author

@haotianw465 please consider this PR #59 also as a bug, therefore a candidate for the minor release.

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.

2 participants