Railway
Pull logs from Railway projects into Dstl8.
Railway emits deployment logs, the stdout and stderr of every service in a project. Dstl8 polls Railway's API as a single source, covering every persistent environment in the project, and infers a stream per service.
Add a Railway source
The Project ID and the API token both come from Railway, so collect them before you open Dstl8.
1. Get your Project ID and API token
In Railway, open the project, click Settings at the top right of the project view, and go to the General tab. Copy the Project ID. It's also the UUID in the project URL, railway.com/project/<project-id>.
Then create an API token:
Go to Railway → Account → Tokens.
Give the token a name. If the project belongs to a team workspace, select that workspace.
Create the token and copy it. Railway shows the value only once.
Use an Account or Workspace token. A project token won't work, because it's scoped to a single environment while a Dstl8 source polls every persistent environment in the project.
2. Open the Add Source dialog
In Dstl8, from Sources, click Add Source and select Railway.
3. Configure the source
In the Configure Railway Source dialog:
Name
A unique name to identify this source.
Project ID
The Project ID you copied from Railway.
API Token
The Account or Workspace token you created.
Filter (optional)
Railway log query syntax, applied server-side. Leave empty to collect every log.
Poll interval
How often Dstl8 polls Railway: 1m (default), 5m, or 15m.
Include PR preview environments
Off by default. Turn it on to collect from PR preview environments too. Each one Dstl8 polls counts against your Railway API rate limit.
Filters use Railway's query syntax: @level:error matches an attribute, -@level:debug negates one, and AND / OR join terms. See Railway's logs documentation for the full reference.
Click Test Connection. You should see Connection successful.
4. Create
Click Create to add the source.
After creating
The source appears in the Sources list as Waiting for logs, with no streams listed yet. Railway history isn't backfilled, so the first streams appear a few minutes after your services next emit logs, and the source transitions to Healthy.
Every Railway stream has the Stream Type railway, and each stream is named after the Railway service that produced it. Logs that Railway can't attribute to a service, such as plugin logs, land in a stream named unknown. A service deployed to several environments is still one stream. Each log keeps its Railway environment as an attribute you can filter on in Dstl8.
Assign streams to workspaces
Streams need to be assigned to a workspace to be accessible. Open the source's actions menu (gear icon) and select Assign Streams, then check the streams you want the Default workspace (or any other workspace) to receive and click Save Assignments.
See Assigning streams to workspaces for details.
Tips
One source covers one Railway project. Railway's rate limit is hourly and per token (100 requests/hour on Free, 1,000 on Hobby, 10,000 on Pro), so sources sharing a token share one budget. On the lower plans, raise Poll interval to
5mor15m.Use a Filter when you want only part of the logs. Railway applies it before sending, so it trims what Dstl8 ingests, though not API usage, which depends on how many environments you poll and how often.
If Test Connection fails, re-check both Project ID and API Token. Railway returns the same
Project not foundresponse for an invalid token and for an unknown project, so the error can't tell you which of the two is wrong.
Last updated