Comments (8)
We will look at this issue as soon as possible. It looks like you patched botocore
or boto3
and httplib
at the same time correct? If you could share the caller code that will help a lot with the debugging.
from aws-xray-sdk-python.
I'm using patch_all()
which patches
[INFO] 2018-04-06T00:25:02.442Z 870efd48-3930-11e8-a425-f7be7f28044b successfully patched module httplib
[INFO] 2018-04-06T00:25:02.443Z 870efd48-3930-11e8-a425-f7be7f28044b successfully patched module pynamodb
[INFO] 2018-04-06T00:25:02.443Z 870efd48-3930-11e8-a425-f7be7f28044b successfully patched module requests
[INFO] 2018-04-06T00:25:02.443Z 870efd48-3930-11e8-a425-f7be7f28044b successfully patched module sqlite3
The caller code is actually not mine, using pandas.read_csv()
(https://github.com/pandas-dev/pandas/blob/v0.22.0/pandas/io/parsers.py#L557-L709)
from aws-xray-sdk-python.
I see. From the stack trace pandas
is depending on botocore
to call AWS S3 APIs to retrieve files. botocore
has some certain part that depends on httplib
. The httplib
patcher failed because botocore
use it in an unexpected way.
We will release a bug fix. With the fix you will not get this error. But you won't see the http roundtrip time since botocore
has custom logic to actually send the http request.
from aws-xray-sdk-python.
Thank you @haotianw465, I can reproduce the error quite easily so let me know if you want a patch tested.
from aws-xray-sdk-python.
Though I don't know how you are using pandas
in your application but I'm fairly confident that if you change this line https://github.com/aws/aws-xray-sdk-python/blob/master/aws_xray_sdk/ext/httplib/patch.py#L106 to the following:
xray_data = getattr(instance, _XRAY_PROP, None)
if not xray_data:
return wrapped(*args, **kwargs)
it should work, assuming you have write access to change this file in place.
from aws-xray-sdk-python.
Confirmed that this patch works.
I see that httplib still gets patched:
successfully patched module httplib
But instead of crashing I get the expected warning:
cannot find the current segment/subsegment, please make sure you have a segment open
from aws-xray-sdk-python.
Cool. We will roll out this fix in the next release as soon as possible, though we cannot provide an exact date.
In the meantime if your application doesn't have direct dependency on httplib
and you don't need to trace those http calls, we would recommend to use patch((my_lib_1, my_lib_2))
to explicit capture the libraries you care about.
from aws-xray-sdk-python.
This issue has been fixed in the latest v1.0 release.
from aws-xray-sdk-python.
Related Issues (20)
- Very rare ReferenceError HOT 2
- Support for psycopg3 HOT 2
- Link a Textract async operation with downstream process HOT 1
- Current tox versions do not like how testenv.passenv is set
- aws_xray_sdk.core.exceptions.exceptions.SegmentNameMissingException: Segment name is required. HOT 1
- Using psycopg2 connection_factory throws exceptions HOT 4
- Documentation for patch_all HOT 2
- Sampling configuration should discuss DefaultSampler vs. LocalSampler HOT 1
- Flask middleware errors when an earlier Flask extension throws an exception in a before_request method HOT 1
- Patched DB cursor and template may record outside of XRayMiddleware HOT 2
- Segment not propgated when subsegment metadata is sufficiently long HOT 4
- sqlalchemy_core patch errors for unencoded special characters in db url HOT 1
- Error when using AsyncContext in python 3.11.5 HOT 3
- MongoDB AttributeError: 'NoneType' object has no attribute 'put_annotation'
- aws-xray-sdk-python compatibility with Python 3.12 HOT 9
- Fix docstring in Entity.close() HOT 1
- No supported for fastAPI, need to add middleware for fastapi HOT 1
- Incompatible with Pynamodb 6.x HOT 4
- trace simple websocket messages - python HOT 5
- Unable to get RDS or SQL tracing with psycopg2 plugin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-xray-sdk-python.