Integrations
Integration

Monitor Railway with Sazabi

By Sazabi Team

Last verified on Nov 8, 2026.

Railway keeps your build and runtime logs for a limited time and has no setting to forward them elsewhere. That shapes how you monitor a Railway service. The data has to leave from inside the application, which also means it can carry more than the platform would add on its own.

Sazabi is AI-native observability and security. For Railway it receives logs and traces straight from your app over OpenTelemetry, and its agent can read Railway itself through a connector.

What Sazabi reads from Railway

On the log side, the Railway source is a set of service variables and the OpenTelemetry SDK. Your app exports logs and traces to the Sazabi intake. The variable OTEL_EXPORTER_OTLP_ENDPOINT points there, and OTEL_RESOURCE_ATTRIBUTES fills in deployment.environment, service.version and railway.deployment.id from Railway's own variables. Those variables are defined in Railway's variables reference: RAILWAY_SERVICE_NAME, RAILWAY_ENVIRONMENT_NAME, RAILWAY_GIT_COMMIT_SHA and RAILWAY_DEPLOYMENT_ID.

Two details matter. print and console.log output is not forwarded, so use a logger such as Python logging, pino, winston or bunyan. And metrics sent to this endpoint are not stored; they belong on the OpenTelemetry Metrics source.

Sazabi ingests OpenTelemetry metrics (Prometheus metrics through an OpenTelemetry Collector) and OTLP traces through the same intake as your logs. It stores each metric data point and each span as a log record that its agent queries alongside your logs, so there is no separate metrics store to run.

On the agent side, the Railway MCP connector authorizes with OAuth and gives the agent tools to read deployment status, build logs and runtime logs, to inspect and update environment variables, and to trigger deployments. The CLI connection adds the railway command to the sandbox with a RAILWAY_TOKEN.

Questions it answers

  • Which commit was running when the errors started?
  • Did the failures begin in one environment, or in all of them?
  • What did the build log say for the deployment that is now failing?
  • Which replica region is the slow trace coming from?
  • Did an environment variable change shortly before the behavior changed?

A worked example: tying errors to a commit

Because service.version is set from RAILWAY_GIT_COMMIT_SHA, every record from the SDK says which commit produced it. That turns a vague report into a short query:

sazabi logs ask "Group error-level Railway records by service.version over the last 6 hours and show the first error for each version"

Say two versions appear. The older commit has a few scattered errors. The newer commit has hundreds, all starting within a minute of its first record. You now have the commit to review and the deployment to roll back to. Ask the agent in a thread to read the build log for railway.deployment.id through the Railway connector, and check whether it also changed an environment variable.

If the older version shows errors too, the commit is not the whole story. Compare deployment.environment next.

Limits to plan around

Railway's own logs expire. Retention is 3 days on Free, 7 on Trial and Hobby, 30 on Pro and up to 90 on Enterprise. Railway also enforces a rate limit of 500 log lines per second per replica, and drops lines above it with a warning (Railway: Logs). Records sent through OpenTelemetry are exported by your app, so check for exporter errors in the deployment logs if volume looks low.

How it fits with other integrations

If your Railway services already use OpenTelemetry, the OpenTelemetry integration explains the protocol, and OpenTelemetry metrics covers the part this source does not store. Compare Railway with Render and Vercel, or browse the cloud platforms category.

Ways to connect

  • Railway (MCP connector): Give the Sazabi agent tools to inspect and manage Railway projects, services, deployments, environment variables, and logs.

Log sources

  • Railway (manual log source, cloud platforms): Set Railway environment variables and bootstrap the OpenTelemetry SDK on your service to send application logs and traces directly to Sazabi.

What Sazabi detects from these logs today

These detections are on for every production project, with no monitors or alert rules to write. Sazabi opens an issue when one fires.

  • Novel event: A kind of error that has never appeared before.

Frequently Asked Questions

Does Railway have a log drain I can point at Sazabi?

No. Railway has no managed external log drain. Your application sends logs and traces to Sazabi with its OpenTelemetry SDK. If you cannot change the application, run a forwarder such as Vector or Fluent Bit as its own Railway service and point it at the same OTLP endpoint.

Why are my console.log lines missing in Sazabi?

The OpenTelemetry SDK does not forward stdout. Log through your runtime's logger, such as Python logging, pino, winston or bunyan. Plain print and console.log output stays in Railway's deployment logs.

Where do I send OpenTelemetry metrics from Railway?

Sazabi does not store OpenTelemetry metrics sent to the Railway log endpoint. Point your metrics exporter at the OpenTelemetry Metrics source instead.

What can the Sazabi agent do with the Railway connector?

It can browse projects, services and environments, read deployment status, build logs and runtime logs, inspect and update environment variables, and trigger and monitor deployments. Railway authorizes it over OAuth, scoped to your workspaces.

Sources

  1. Railway has no platform log drain; the app sends logs and traces with the OpenTelemetry SDK; variables, stdout is not forwarded, metrics are not stored on this endpoint (accessed Nov 8, 2026)
  2. Railway MCP connector uses OAuth and lets the agent read deployment status, build logs and runtime logs and update environment variables (accessed Nov 8, 2026)
  3. Railway CLI in the agent sandbox with RAILWAY_TOKEN (accessed Nov 8, 2026)
  4. Log retention by plan, 500 log lines per second per replica limit, stdout and stderr level normalization, HTTP log attributes (accessed Nov 8, 2026)
  5. Railway-provided variables such as RAILWAY_SERVICE_NAME, RAILWAY_DEPLOYMENT_ID, RAILWAY_GIT_COMMIT_SHA and RAILWAY_REPLICA_REGION (accessed Nov 8, 2026)