Skip to content

Conversation

@r4victor
Copy link
Collaborator

@r4victor r4victor commented Nov 7, 2025

Closes #3035

This PR adds the --since argument to the dstack attach --logs command that allows getting realtime logs without loading the full logs history first:

✗ dstack attach logs-task --logs --since 1m
Attached to run logs-task (replica=0 job=0)
To connect to the run via SSH, use `ssh logs-task`.
Press Ctrl+C to detach...
424
425
426
427
428
429
430

Implementation

Extended the logs websocket endpoint to accept a query param start_time to filter out the old logs.

Backward compatibility

If a new client sends start_time to the old runner, it's ignored. So --since simply has no effect when used with old runners, but otherwise logs work as before.

@r4victor r4victor merged commit d2a8870 into master Nov 7, 2025
28 checks passed
@r4victor r4victor deleted the issue_3035_tail_attached_logs branch November 7, 2025 03:58
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

Successfully merging this pull request may close these issues.

[Feature]: Tail attached logs

2 participants