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

Issue with using xray with async function #96

Closed
oba11 opened this issue Sep 12, 2018 · 2 comments
Closed

Issue with using xray with async function #96

oba11 opened this issue Sep 12, 2018 · 2 comments

Comments

@oba11
Copy link

oba11 commented Sep 12, 2018

Tried using xray with async function but keep getting this error

Traceback (most recent call last):
  File "app.py", line 333, in <module>
    xray_recorder.end_segment()
  File "/usr/local/lib/python3.6/site-packages/aws_xray_sdk/core/recorder.py", line 206, in end_segment
    if self.current_segment().ready_to_send():
AttributeError: 'NoneType' object has no attribute 'ready_to_send'

PIP

aiobotocore     0.9.4
aws-xray-sdk    1.1
boto3           1.7.58
botocore        1.10.58

N.B: I know latest version of aws-xray-sdk is not supported with aiobotocore

Thanks

@haotianw465
Copy link
Contributor

Hi, could you provide a code snippet of your X-Ray SDK configuration and the part that triggers this error so I can take a further look? Are you running this in AWS Lambda or locally? Is this a script or a web app? Thanks.

@haotianw465
Copy link
Contributor

The particular error is tracked here #96. Closing this and please free feel to comment or open a new one if you have problem figuring out why the context doesn't propagate through async functions.

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

No branches or pull requests

2 participants