Connect a Railway project
- Open your project in Squasher and select Settings in the sidebar, then the Integrations tab.
- On the Railway card, select Connect, then approve the access in Railway. Give Squasher access to the Railway project that you want to monitor.
- Back in Squasher, choose the project in Railway project and select Connect project. When Railway grants access to only one project, Squasher chooses it for you.
Send data from your service
You need a Railway service that you can redeploy, and an ingest key and the project ID. See Create an ingest key.- In Railway, open the service and select Variables.
- Add
SQUASHER_API_KEYandSQUASHER_PROJECT_ID. - Connect the service with one of these options, then redeploy it.
- Node.js
- OpenTelemetry
Install
@squasher-ai/node and initialize it before your app code:src/index.ts
What Squasher keeps
To also send the plain stdout lines of a service, run a log forwarder, such as
Vector, in the Railway project. Railway describes this setup in its
guide to shipping logs.
Verify
- Throw one test error in the service, or record a span with
ERRORstatus. - In Squasher, select Issues in the sidebar. The error is at the top of the list.
Limits
- A Railway connection pulls logs and metrics on a schedule, so they arrive a few minutes late. Send errors from inside the service for issues with stack traces.
RAILWAY_ENVIRONMENT_NAMEis a variable that Railway sets. If your Railway environment has another name thanproduction, automatic AI triage does not run on its issues by default.
Next steps
Node.js SDK
See every option of the Node.js SDK.
OpenTelemetry
Set up traces, logs, and metrics in any language.