Add internal endpoint for tokio task dumps - #5594
Merged
Merged
Conversation
joshua-spacetime
force-pushed
the
joshua/tokio-taskdump
branch
from
July 27, 2026 18:13
653062a to
416804b
Compare
joshua-spacetime
marked this pull request as ready for review
July 27, 2026 18:14
gefjon
approved these changes
Jul 27, 2026
Contributor
There was a problem hiding this comment.
Works on my machine, except that:
- No replication runtime on standalone.
Query param for timeout istimeout-ms, nottimeout_ms, due to some rewriting somewhere between Axum and serde.- EDIT: I was misinterpreting the error from
replicationbeing an unknown runtime.timeout_msdoes appear to be correct.timeout-msis ignored as an unknown query param.
- EDIT: I was misinterpreting the error from
But I was able to run several requests and get sensible responses against SpacetimeDB-standalone running locally.
joshua-spacetime
enabled auto-merge
July 27, 2026 21:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Introduces another
/internalroute for capturing tokio task dumps.The endpoint is available under
/internal/task-dumpand returns a plain-text dump of every task on the selected Tokio runtime.Usage Examples
Dump the main runtime
timeout_msdefaults to 2 seconds.Dump the replication runtime with a longer timeout
An unknown runtime returns
400 Bad Requestwith the valid names. If the runtime cannot complete the dump within the requested timeout, the endpoint returns504 Gateway Timeout.API and ABI breaking changes
None
Expected complexity level and risk
2
Testing