Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Implement cancellation chain tracker #8

Merged
merged 12 commits into from
Oct 18, 2022
Merged

Conversation

achimnol
Copy link
Owner

@achimnol achimnol commented Oct 5, 2022

This will allow diagnose the reason why some tasks are silently cancelled or terminated in live servers.

* TODO: trim the history to prevent memory leak
* TODO: add a command to show cancellation chain
@achimnol achimnol added the enhancement New feature or request label Oct 5, 2022
@achimnol achimnol marked this pull request as ready for review October 18, 2022 07:23
@achimnol achimnol merged commit ed025c7 into master Oct 18, 2022
@achimnol achimnol deleted the feature/cancellation-tracker branch October 18, 2022 07:28
achimnol added a commit to aio-libs/aiomonitor that referenced this pull request Apr 24, 2023
* Add optional task creation stack chains to 'where' command (achimnol#1)
* feat: Rewrite ps command to provide more concise view (achimnol#2)
* feature: print numbers of total tasks when executing `ps` (achimnol#3)
* Adopt `prompt_toolkit` and support concurrent clients (achimnol#4)
* feat: Migrate to Click-based command line interface (achimnol#5)
* fix: Reimplement console command (achimnol#6)
* Support auto-completion of commands and arguments (achimnol#7)
* Implement cancellation chain tracker (achimnol#8)
* New commands:
  - `ps-terminated` (`pt`, `pst`)
  - `where-termianted` (`wt`)
* New options:
  - `ps`, `pt`: `-f`, `--filter` to search task logs by their names and
    coroutine summary strings
  - `aiomonitor.Monitor` now has the history limit option (default: 1000)
* Selective persistent termination logs (achimnol#9)
- We should preserve the termination log of tasks that are supposed to
  be long-running and not terminated during the entire application
  lifecycle (e.g., server apps), when there are many volatile tasks
  continuously spawned and destroyed, regardless of the history limit.
* fix: Support passing `name` and `context` kwarg to `create_task()` (achimnol#10)
* fix: Regression in Python 3.10 due to achimnol#10 (achimnol#11)

---------

Co-authored-by: Kyujin Cho <thy2134@me.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant