Railway
Set Railway environment variables and bootstrap the OpenTelemetry SDK on your service to send application logs and traces directly to Sazabi.
About
Send your Railway service logs and traces to Sazabi. Railway has no platform log drain, so your application sends logs and traces through its OpenTelemetry SDK, pointed at Sazabi. The data comes straight from your running app rather than from Railway itself.
Prerequisites
- A service deployed on Railway.
- Your Sazabi intake URL (shown above).
Set up in the dashboard
Set Railway variables
Add these variables in the Railway service Variables page. OTEL_EXPORTER_OTLP_ENDPOINT is your intake URL (shown above). Railway fills in the ${{...}} references from its own service and deployment metadata.
OTEL_EXPORTER_OTLP_ENDPOINT=<your intake URL>
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_SERVICE_NAME=${{RAILWAY_SERVICE_NAME}}
OTEL_RESOURCE_ATTRIBUTES=deployment.environment=${{RAILWAY_ENVIRONMENT_NAME}},service.version=${{RAILWAY_GIT_COMMIT_SHA}},railway.project.name=${{RAILWAY_PROJECT_NAME}},railway.deployment.id=${{RAILWAY_DEPLOYMENT_ID}}Railway previews the staged variable change set — review and deploy it when prompted.
Railway has no managed external OTLP drain. If you cannot add the SDK to your application, run a log forwarder such as Vector or Fluent Bit as its own Railway service and point it at the same OTLP endpoint.
Bootstrap the runtime
Install the OpenTelemetry packages for your runtime and load auto-instrumentation at startup.
Node.js
bun add @opentelemetry/api @opentelemetry/sdk-node @opentelemetry/auto-instrumentations-node @opentelemetry/exporter-trace-otlp-proto @opentelemetry/exporter-logs-otlp-proto
# Railway variable or start-command prefix:
NODE_OPTIONS="--require @opentelemetry/auto-instrumentations-node/register"Python
pip install opentelemetry-distro opentelemetry-exporter-otlp-proto-http
opentelemetry-bootstrap -a install
# Railway start command example:
opentelemetry-instrument python app.pyRedeploy and verify
Review and deploy the staged variable change set when prompted, then send some traffic to the service.
Set up with the CLI
You can also register the Railway log source with the Sazabi CLI (installed and authenticated — see CLI reference).
Registering the source mints the same intake URL the dashboard shows above (the public key is embedded in its hostname):
sazabi log-sources create railway --mode connectionlessThe command prints the intake URL for the new source — copy the whole URL and point your sender at it using the configuration shown above. Run sazabi log-sources get <log-source-id> at any time to reprint the endpoint, or sazabi log-sources list to see every log source in the project.
Verify
Send traffic to your Railway service. Open the Intake page in the Sazabi dashboard and confirm logs or traces from the Railway source appear. Records typically arrive within a minute or two of the request.
If nothing appears, check the Railway deployment logs for OpenTelemetry exporter errors and confirm your app is sending through OpenTelemetry, not only to stdout.
Troubleshooting
No telemetry appears — Confirm OTEL_EXPORTER_OTLP_ENDPOINT is set on the service variable, not only at build time. Check the Railway deployment logs for OTLP exporter errors.
Metrics are not stored — Sazabi does not store OpenTelemetry metrics sent to this endpoint. Point your metrics exporter at the OpenTelemetry Metrics source instead.