-
Notifications
You must be signed in to change notification settings - Fork 1
[python] Add asyncio check #60
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
base: main
Are you sure you want to change the base?
Conversation
3a647b0 to
6d15dfd
Compare
6d15dfd to
a3ac50c
Compare
|
|
||
| EXECUTION_TIME_SEC = float(os.environ.get("EXECUTION_TIME_SEC", "2")) | ||
|
|
||
| short_task = asyncio.create_task(my_coroutine(EXECUTION_TIME_SEC / 2)) |
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.
💭 a sleep after this could make sure that you do not instrument it while it is not scheduled.
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.
As discussed offline, the Task is already pretty much scheduled ("scheduled soon") after this call
r1viollet
left a comment
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
Thanks for adding this in. Just a minor idea.
a3ac50c to
e29236e
Compare
What does this PR do?
This PR adds a new (very basic) correctness check for
asynciostacks.Note that, for now, we focus on a basic use case, and we don't even get fully correct stacks as we don't have visibility into the
asyncio.sleepcall (not included in the expected regular expression).This has been fixed in dd-trace-py but has not been released yet.