Conversation
|
@Milo123459 hello! could you check changes to support https logs, very useful for development via agents |
Milo123459
left a comment
There was a problem hiding this comment.
blocked by previous comment. other then that, all good
src/controllers/deployment.rs
Outdated
| filter: Option<String>, | ||
| on_log: impl Fn(queries::http_logs::HttpLogFields), | ||
| ) -> Result<()> { | ||
| // HTTP log subscriptions currently return empty payloads for this backend |
There was a problem hiding this comment.
Hmm, I think this is probably not the right approach- if we can use subscriptions we should. I'll have a look into it so we don't have to do a workaround like this
There was a problem hiding this comment.
thank you!
Fixed this to use the subscription path instead of the polling workaround.
The HTTP logs subscription does work here, but it needed the subscription window args (anchorDate, afterDate, afterLimit) to behave like a live tail. I updated stream_http_logs to use that subscription shape and validated it against a real Railway service with fresh requests while the stream was attached
There was a problem hiding this comment.
i've got this working locally using subscriptions. lmk if i should just push to this branch
There was a problem hiding this comment.
thank you, i think you could push your implementation also or check mine, let's just make it happen in any way 👍
There was a problem hiding this comment.
hello! could we merge?
There was a problem hiding this comment.
Since HTTP logs are tied to a specific deployment rather than a service, a user could be watching HTTP logs, make a deployment, and the logs will just stop coming in without any indication of why.
So, to avoid this confusion, please implement a poller running on a 5-second loop to detect when the current deployment is removed, close the websocket connection, and notify the user that the deployment was removed.
- Fix HTTP log fetch to use anchor-based pagination (beforeLimit/anchorDate) instead of limit/startDate/endDate which the backend ignores - Add all 20 HttpLog fields to GraphQL fragments for full JSON output parity with the dashboard - Add typed filter flags: --method (enum-validated), --status (supports 200, >=400, 500..599), --path, --request-id (all require --http) - Expand --filter help to list all filterable fields and operators Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Hey @dmedov, thank you so much for the PR! I tested this against a live account and pushed a follow-up commit with a few additions:
Also expanded the --filter help text to list all available fields and operators |
Thank you @m-abdelwahab , nice filters |
When a deployment is removed while streaming HTTP logs, the CLI now exits cleanly with a message instead of silently retrying forever. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
This adds HTTP request log support to
railway logsandrailway service logs.Users can now query request logs from the CLI with the same workflow they already use for build and deploy logs, including filtering by Railway log query syntax and streaming live request traffic from an interactive terminal.
What changed
--httptorailway logsandrailway service logsExamples