Railway logs
Railway has no log drains of its own. Locomotive is a template you add to a Railway project: it reads the logs of the services you pick and posts them to a webhook.
What you get
- Railway logs in Logs, next to your traces and metrics, searchable with the same query language (
severity>=WARN service=checkout "timeout"), grouped into patterns or followed live. - A log line that names a request path joins the business flow of that route, so a failing checkout shows its platform logs on the checkout flow's page.
- A line that carries a trace id opens its trace.
- Alert on any search with Alert on this, and let the agent read these logs when it investigates an incident.
Set it up
First create an ingest key: in the app, open Settings > API keys and pick Services. In the examples below, KEY stands for that key. Keep it out of your repository, like any other secret.
- In your Railway project, add the Locomotive template.
- Give it a Railway API token and the services to forward.
- Set its webhook to Flowhawk:
LOCOMOTIVE_WEBHOOK_URL=https://api.flowhawk.dev/v1/logs/railway LOCOMOTIVE_ADDITIONAL_HEADERS=Authorization=Bearer KEY LOCOMOTIVE_WEBHOOK_MODE=json
The same steps, with your workspace's address filled in, are in the app under Settings > Integrations > Log drains.
What arrives
| Railway | In Flowhawk |
|---|---|
| Service name | The service |
| Project, environment and deployment | Attributes on each line |
| A JSON log line from your app | Its message, level, trace id and fields |
Related
Fly.io logsShip the logs of every app in a Fly.io organization to Flowhawk with Fly's own log shipper.
Vercel log drainSend the logs of your Vercel projects to Flowhawk with a log drain.
OpenTelemetry for Express and Node.jsTrace an Express, Fastify or NestJS app with OpenTelemetry, and send it to Flowhawk with one flag or one line.